How to Enable the PDF Function in Power Apps
Turn on Power Apps’ experimental PDF function, generate a PDF from a screen, configure output, and fix common rendering problems.
To enable PDF generation in a Power Apps canvas app, open Settings → Upcoming features → Experimental in Power Apps Studio and switch on PDF function. Then call PDF(ScreenName) from a behavior property such as a button’s OnSelect.
Microsoft labels this feature experimental. Review the documented limitations and test the result on the devices and data your app will use before relying on it in production. See Microsoft’s PDF function documentation and reference page.
Enable the PDF function
- Sign in to Power Apps and open Power Apps.
- Create a canvas app or open an existing canvas app in Power Apps Studio.
- Select Settings on the command bar.
- Open Upcoming features.
- Select the Experimental tab.
- Turn on PDF function.
- Close settings and select the screen or control that should be exported.
The setting is app-specific. If you open another app, check that app’s experimental settings as well.
Generate a PDF from a screen
Add a button to the screen and put this formula in its OnSelect property:
PDF(SubmitInspectionScreen)
Replace SubmitInspectionScreen with the actual screen name. A semicolon can follow the expression when it is part of a longer behavior formula:
PDF(SubmitInspectionScreen);
The function creates a PDF object in memory. It does not automatically save a file to OneDrive, download it, or email it. You must store the object or pass it to another action.
Store the generated PDF and send it to a connector
Use Set to keep the result in a global variable:
Set(myPDF, PDF(SubmitInspectionScreen))
You can then pass myPDF to a supported connector action, such as an Office 365 Outlook action, or send it to a Power Automate flow. The exact connector fields depend on the connector and flow design.
A typical button formula can generate the document and then call a flow:
Set(myPDF, PDF(SubmitInspectionScreen));
'Create inspection PDF'.Run(myPDF)
Configure the flow to accept the file content and create the destination file or attachment. Keep the PDF generation in a behavior property such as OnSelect, OnVisible, or OnHidden, as Microsoft documents.
Choose what Power Apps exports
The target can be the currently visible screen or supported content on that screen. Microsoft documents these target types:
- A screen.
- A vertical gallery.
- A vertical or horizontal layout container.
- A container.
For a whole screen, use the screen name:
PDF(ReportScreen)
For a focused section, target the supported gallery or container instead:
PDF(InspectionSummaryContainer)
Only content that is currently visible and supported by the function is a reliable export target. Design a dedicated print or export screen when the normal interactive screen contains navigation, transient controls, or content that should not appear in the document.
Configure paper size, resolution, margins, and layout
The PDF function accepts an optional configuration record. Microsoft documents options for paper size, DPI, margins, orientation, and container expansion. The defaults are:
| Setting | Documented default or behavior |
|---|---|
| Resolution | 96 DPI |
| Orientation | Portrait |
| Margins | 0.5 inch |
| Paper size | Letter in the United States and Canada; A4 in other locales |
| ExpandContainers | Controls whether supported containers expand to include their content |
Use the option names and enum values shown in the current Microsoft reference for your tenant. A configuration record follows this pattern:
PDF(
ReportScreen,
{
PaperSize: "A4",
DPI: 150,
Margin: "0.25in",
Orientation: "Landscape",
ExpandContainers: true
}
)
If your studio flags an option or value as invalid, use the names and value types offered by IntelliSense in that version of Power Apps; the feature is experimental and its reference is prerelease.
When to change each option
- Paper size: choose A4, Letter, or the required paper format for the recipient.
- DPI: increase resolution for small text or detailed images, but expect larger files and more device memory use.
- Margins: reduce margins for dense reports, while leaving enough space for printers that cannot print to the edge.
- Orientation: use landscape for wide tables and portrait for forms or narrative reports.
- ExpandContainers: enable it when a supported container must grow to include content that extends beyond its normal displayed bounds.
Display the result with the PDF viewer
The PDF function creates a PDF object. The PDF viewer is a separate experimental control that displays PDF documents. Do not confuse the two.
The viewer’s documented restrictions include:
- The source must be a direct HTTPS PDF link.
- The file must allow anonymous access.
- Restrictive CORS settings can block loading; the host may need to allow requests from
powerapps.com. - The viewer does not support printing.
For private or newly generated PDFs, passing the in-memory object to a connector or Power Automate is usually a better workflow than publishing an anonymously accessible URL.
Controls and content that may not export correctly
Microsoft documents limitations that affect what appears in the generated file:
- Charts.
- Power BI tiles.
- Maps.
- Some configurations of third-party PCF controls.
- Nested galleries.
- Fillable PDF creation.
- Some non-Latin scripts and font weights or styles, depending on the font.
Build a plain export layout with standard labels, galleries, shapes, and containers when fidelity matters. Do not assume that an interactive control has an equivalent editable or fillable representation in the PDF.
Reliability, performance, and device limits
PDF generation occurs on the device running the app. Very large screens, high DPI, many images, or long galleries consume more memory and can make generation slow. Microsoft notes that exceptionally large files can crash the app depending on device capacity.
- Keep export screens focused instead of exporting an entire navigation-heavy screen.
- Limit unnecessary images and repeated controls.
- Use the lowest DPI that still makes text readable.
- Test with the largest realistic gallery and the longest expected text.
- Test on the phones, tablets, browsers, or desktop clients your users actually run.
- Show a progress state and prevent duplicate taps while the PDF is being created.
Because the output is held in memory, save or transmit it promptly. Do not retain large PDF objects in multiple variables unless the workflow requires it.
Troubleshooting common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| “PDF” is not recognized | The experimental feature is disabled, or the app has not refreshed after enabling it. | Turn on PDF function under Settings → Upcoming features → Experimental, then reopen or refresh the app. |
| The formula has an invalid name | The screen or control name in the formula does not match the app. | Select the target in the tree view and insert its exact name, including spaces or quoted identifiers where Power Fx requires them. |
| The PDF is blank | The target is not the visible screen or contains unsupported controls. | Export the visible screen or a supported container, and replace unsupported content with standard controls. |
| Content is cut off | A fixed-size container or gallery does not include all content. | Use a dedicated export layout and review the ExpandContainers option for supported containers. |
| Text or fonts look wrong | The selected font, weight, style, or script is not fully supported. | Use a commonly supported font and test non-Latin text on the target devices. |
| The app closes or becomes unresponsive | The generated file is too large for the device’s available memory. | Reduce DPI, images, rows, or screen complexity; generate smaller documents or split the report. |
| The PDF viewer cannot load a file | The URL is not direct HTTPS, access is not anonymous, or CORS blocks powerapps.com. | Use a direct HTTPS PDF URL, configure access and CORS correctly, or send the in-memory object through a connector instead. |
| A PDF cannot be filled in | The function creates a rendered PDF, not a fillable form. | Use a form-generation system designed for fillable PDFs. |
Testing checklist before publishing
- Confirm the PDF function is enabled in the app’s Experimental settings.
- Generate the document with empty, typical, and maximum-length data.
- Check portrait and landscape layouts where both are possible.
- Verify every gallery row and long text block appears.
- Inspect charts, maps, Power BI tiles, PCF controls, and nested galleries separately.
- Test non-Latin text and the fonts used by your organization.
- Run the export on each supported device class.
- Verify the connector or flow receives the PDF object and handles failures.
Or skip the browser setup
If your requirement is a screenshot or PDF of a public web page rather than a PDF rendered from Power Apps controls, ScreenshotNeo provides a single HTTP endpoint. It is separate from the Power Apps PDF function: it captures websites, while Power Apps exports canvas app content.
See the ScreenshotNeo API documentation for request options.
cURL
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
timeout=90,
)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)
Node.js
const q = new URLSearchParams({
access_key: 'YOUR_API_KEY',
url: 'https://stripe.com'
});
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const bytes = await res.arrayBuffer();
await Bun.write('shot.webp', bytes);
ScreenshotNeo removes cookie and consent banners, newsletter popups, and chat widgets before capture. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers report the page verdict and whether the request was billed. It also provides an MCP server for AI agents, including Claude and Cursor. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.
Create a free ScreenshotNeo account to try the API.
FAQ
Is the PDF function enabled by default?
No. It is an experimental feature and must be enabled in the app settings.
Can I call PDF from a label’s Text property?
Use a behavior property such as OnSelect, OnVisible, or OnHidden. Store the result in a variable if another action needs it.
Does PDF create a file automatically?
No. It returns an in-memory PDF object. Pass that object to a connector or Power Automate flow to save, email, or process it.
Can I make a fillable PDF form?
No. Microsoft lists fillable PDF creation as a limitation of this function.
Why does the same app produce different results on devices?
Generation runs on the device, and available memory, fonts, control support, and screen dimensions can affect the result. Test on the devices you support.


