SkillsReviewed · microsoft

add-pdf-report for Power Apps mobile apps

add-pdf-report is an internal assistant skill for Power Apps mobile developers who need PDF reports, but it requires an app that already includes expo-print. It guides creation or reuse of a TypeScript wrapper for local PDF generation, with conditional sharing and app-specific Dataverse upload guidance.

Researched 16 Nov 2026

In short.

add-pdf-report is an internal assistant skill for Power Apps mobile developers adding PDF exports, and it requires an existing app with expo-print. It specifies a wrapper that converts app-owned HTML into a local PDF, optionally shares the file through expo-sharing, and exposes data for a separate Dataverse upload integration. Its parent skill and shared compatibility instructions were not supplied, so complete integration behavior is unknown. No code was executed.

Researched and written by an AI model and checked by a second AI model. How it works

The selected scope is plugins/mobile-apps/skills/add-native/add-pdf-report at commit 198d91b94abc29fcd59962d6202b454274500411. The supplied manifest marks that scope complete and contains its SKILL.md plus the repository-root LICENSE as an applicable notice outside the folder. Parent routing, shared instructions, compatibility references, package code, generated services and app code are outside the supplied contents. No installation, type check, PDF generation, sharing, viewing, upload or device behavior was executed.

The overview

Identity

add-pdf-report is an implementation skill in Microsoft's power-platform-skills repository, under plugins/mobile-apps/skills/add-native/add-pdf-report. The original source location is [https://github.com/microsoft/power-platform-skills/tree/main/plugins/mobile-apps/skills/add-native/add-pdf-report].

Its metadata sets user-invocable to false and disable-model-invocation to true, and names sonnet as the model. The documented user entry points are /add-native pdf-report, /add-native generate-pdf and /add-native pdf-export; the parent skill routes requests to this helper.

Assessment

This is a useful implementation reference for an existing Power Apps mobile project that needs reports generated from its own data. It provides concrete wrapper code and distinguishes PDF generation, device sharing, viewing and database retention.

Its usefulness depends on the surrounding app and plugin. It does not install missing native packages or complete screen integration. The source establishes intended behavior and implementation details; device compatibility, PDF output quality and runtime reliability remain unassessed.

Users

The intended users are developers maintaining Power Apps mobile apps through the parent /add-native workflow. Example uses include inspection reports, certificates, receipts, evidence summaries and other documents built from app records.

Beginners need enough TypeScript and HTML knowledge to connect app data to the wrapper and display errors. Experienced developers receive guidance on preserving existing exports, returning structured results and adapting generated Dataverse upload types. The application developer remains responsible for screen wiring and upload adapters.

Capabilities

The skill directs an assistant to create, verify or make an approved update to src/native/pdfReport.ts. Its core API comprises escapePdfHtml for text escaping, wrapPdfDocument for constructing an HTML document, and createPdfReport for generating a local PDF file through expo-print.

Generation can return a file URI, page count and optional base64 data. When sharing is requested and expo-sharing is already present, the wrapper can also expose sharePdfReport and structured sharing results. Dataverse retention is described as a separate integration using generated File-column services.

Using it

Requirements

The documented app check requires app.config.js, power.config.json, package.json and a src directory. Every operation must use the absolute app working directory inherited from /add-native.

expo-print must already appear in dependencies or devDependencies. Sharing additionally requires expo-sharing. The helper stops when required packages are missing and does not install them or edit native configuration. Exact supported versions of these Expo packages are unspecified.

The documented native-viewer route requires @microsoft/power-apps-native-pdf-viewer 0.2.9 or later. Dataverse retention requires a suitable File column, generated services and an upload payload matching their types. The referenced shared instructions and compatibility contract are additional dependencies whose contents were not supplied.

Mechanism

The sample wrapper passes HTML to Print.printToFileAsync and requests base64 only when includeBase64 is true. It returns results distinguished by an ok field, allowing callers to handle success and failure explicitly. Empty HTML produces EMPTY_HTML; caught generation failures produce PRINT_FAILED.

The sharing example accepts file:// URIs, checks Sharing.isAvailableAsync and invokes Sharing.shareAsync with PDF identifiers. Its failure reasons distinguish invalid URIs, unavailable sharing and share failures. The wrapper keeps HTML generation app-owned and does not fetch remote HTML.

For retention, the documented sequence saves or updates the parent Dataverse row, checks success, generates the PDF with base64, converts that data into the service's required file representation and uploads it to a File column. A local URI is usable as the upload payload only if that generated service explicitly supports it.

Setup

The documented starting point is one of the parent /add-native commands. The helper checks the app directory and package declarations, then checks any existing wrapper against the requested generation, sharing and retention capabilities before changing it. Existing custom HTML logic and compatible exports are to be preserved.

Screens are expected to import the wrapper rather than Expo modules directly. The prescribed type check is npx --no-install tsc --noEmit, followed by checks defined in the shared compatibility contract. These commands were not executed, and the referenced contract was not available.

The skill states that wrapper edits can use Metro hot reload when the required packages are already in the native build. Packages added separately require a native rebuild outside this helper. Installation instructions for the surrounding plugin are not included.

Example

The source illustrates an inspection report. The application escapes the inspection summary with escapePdfHtml, inserts it into bodyHtml, wraps the document with an inspection-report title and calls createPdfReport. It checks report.ok before using the returned file URI.

If sharing is approved and available, the application passes that URI to sharePdfReport and handles sharing failure separately from generation failure. Without expo-sharing, the documented integration omits the Share button.

For a retained report, the example first updates the inspection row, then requests base64 output and uploads a converted file to cr123_reportfile. The conversion function is deliberately app-specific and is not implemented in the example. These are source examples, not demonstrated execution results.

Assessment & evidence

Limitations

The helper's implementation scope is the PDF wrapper. Screen integration, generated-service changes, missing native dependencies and native rebuilds remain outside it. Generation support alone does not satisfy a request that also requires sharing or retention.

escapePdfHtml escapes individual text values, and wrapPdfDocument escapes the title. However, bodyHtml and styles are inserted directly into the document. The example therefore does not establish general sanitization of arbitrary supplied HTML or CSS.

The complete shared compatibility checks, supported device and operating-system matrix, accessibility of generated PDFs, large-document limits, rendering fidelity and performance are unknown. No runtime tests, sample output PDFs or measured results were supplied.

Design rationale

The structured results let an application distinguish a failure to generate a PDF from a failure to share an already generated file. The explicit base64 option supports retention without requiring every generation call to request that extra representation.

The separate upload adapter addresses a concrete integration boundary: a file:// string is not automatically the File, blob, bytes or picked-file object expected by a generated service. These are implications of the documented design; they do not establish runtime reliability.

Related routes

The source identifies /add-native pdf-viewer for opening an existing HTTPS or local PDF through the native viewer, and /add-native document-picker for selecting an existing document. It also identifies the host FilePicker for Dataverse File columns.

These routes address viewing and importing alongside this helper's report-generation role. Their implementations were not included. No competing PDF-generation libraries, pricing comparisons or performance comparisons were assessed.

Source evidence

The substantive source is SKILL.md at repository commit 198d91b94abc29fcd59962d6202b454274500411, acquired from [https://raw.githubusercontent.com/microsoft/power-platform-skills/198d91b94abc29fcd59962d6202b454274500411/plugins/mobile-apps/skills/add-native/add-pdf-report/SKILL.md]. Its recorded SHA-256 is 41b23a6f155bd7ada3054c557cf41ac4810b96f7d0076123ee45a793dd64e83c.

The accompanying repository-root LICENSE supplies the reuse terms. The parent /add-native implementation, shared instructions, native-artifact compatibility reference, package implementations and an actual app were not supplied. Findings describe the instructions and examples in these sources; no commands, app journeys or device behavior were executed.

Access & freshness

Costs

The supplied source provides no pricing or usage estimates for the assistant, Expo, Power Apps or Dataverse. Setup effort and operating costs are unknown. The MIT licence grants reuse rights but does not establish the cost of the surrounding tools or services.

Rights

The supplied repository-root licence is MIT, with Microsoft Corporation named as copyright holder. It permits use, copying, modification, distribution, sublicensing and sale, provided the copyright and permission notices accompany copies or substantial portions. It also disclaims warranties and liability.

The captured skill can be redistributed with that notice under the supplied terms. Licences and service terms for Expo packages, the native viewer, the assistant host and Power Platform were not supplied or assessed. The licence source is [https://raw.githubusercontent.com/microsoft/power-platform-skills/198d91b94abc29fcd59962d6202b454274500411/LICENSE].

Version and freshness

The supplied snapshot was captured at 2026-11-16T12:28:11.830Z and is pinned to commit 198d91b94abc29fcd59962d6202b454274500411. That identifies the analyzed revision; it does not establish its publication date or the latest repository contents.

The skill provides no release version for itself. Its viewer guidance names version 0.2.9 or later, while exact Expo-package and assistant-host compatibility remain unspecified. Changes after the captured revision are unknown.

Adoption guidance

Before adopting the helper, obtain its parent and shared instruction files from the same revision, confirm the app meets the directory requirements and check that required native packages are present in both package metadata and the app build. Decide whether the intended outcome includes generation, sharing, viewing or retained storage.

Check an existing wrapper against the full requested API before reusing it. For Dataverse retention, confirm the File column and generated upload signature and supply the required conversion adapter. Keep screen integration separate from the helper's bounded edits.

Validate the finished integration on target devices, including empty HTML, print failure, unavailable or failed sharing, missing base64 and failed save or upload operations. Inspect generated PDF layout and run the documented type check. These remain recommended actions, not completed validation.

Evidence for this report

LICENSEnotice · checked 2026-11-16