# Add PDF Viewer

Internal implementation skill invoked by /add-native for native PDF control workflows.

- Repository: https://github.com/microsoft/power-platform-skills (1098 stars)
- Category: Documents
- License: MIT
- Last updated: 2026-10-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add microsoft/power-platform-skills --skill add-pdf-viewer -g -a claude-code -y`
Codex: `npx skills add microsoft/power-platform-skills --skill add-pdf-viewer -g -a codex -y`
Cursor: `npx skills add microsoft/power-platform-skills --skill add-pdf-viewer -g -a cursor -y`
Gemini CLI: `npx skills add microsoft/power-platform-skills --skill add-pdf-viewer -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add microsoft/power-platform-skills`

## Description

Internal implementation skill invoked by /add-native for native PDF control workflows. Handles HTTPS and file URI PDF viewing with @microsoft/power-apps-native-pdf-viewer 0.2.9+.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

**📋 Shared instructions: [shared-instructions.md](${PLUGIN_ROOT}/shared/shared-instructions.md)**, read first.

**Working directory:** before any project read or command, execute
[native-artifact-compatibility.md Step 0](${PLUGIN_ROOT}/shared/references/native-artifact-compatibility.md#0-bind-every-operation-to-the-app-root).
Inherit `/add-native`'s resolved absolute `working_dir`; bind every shell call and
file tool to it, even when this helper starts from another directory.

# Add PDF Viewer

**Internal helper.** Users should invoke `/add-native pdf-viewer`, `/add-native pdf-control`, or `/add-native @microsoft/power-apps-native-pdf-viewer`; `/add-native` routes here after resolving the capability.

Generate or verify the native PDF viewer wrapper and show how to call its **native React Native API**. Version 0.2.9 and later support HTTPS PDF URLs and local `file://` URIs. Do not use the HostingSDK / PCF path from the package README; that is for a different use case.

## Steps

### 1. Verify app

```bash
cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
test -f app.config.js && test -f power.config.json && test -f package.json && test -d src || { echo "BLOCKED: working_dir is not an initialized app" >&2; exit 1; }
```

If this fails, tell the user to run `/create-mobile-app` first and STOP.

### 2. Verify package is already present

The rest: https://github.com/microsoft/power-platform-skills/blob/HEAD/plugins/mobile-apps/skills/add-native/add-pdf-viewer/SKILL.md
