In a Power Apps canvas app, use Download("https://example.com/file.pdf") to download an existing PDF. To create a PDF from the current app screen, enable the experimental PDF function and call PDF(YourScreen). You can then show that object in the PDF viewer, attach it with Outlook, or send it to Power Automate for storage in SharePoint.
Choose the PDF method that matches your source and destination
| What you have | Where it should go | Power Apps approach | Important limitation |
|---|---|---|---|
| An existing, publicly reachable PDF URL | Device or browser download | Download(URL) |
The function cannot authenticate the URL itself. |
| Content currently displayed in the canvas app | PDF object, viewer, email, or flow | PDF(ScreenOrControl) |
Experimental, device-side generation. |
| Generated PDF | Inside the app | PDF viewer control | Hosted files need a direct HTTPS URL and anonymous access. |
| Generated PDF | Office365Outlook.SendEmailV2 |
Uses the Outlook action connector. | |
| Generated PDF | SharePoint library | Power Automate (V2) plus Create file | The flow connection needs library permission. |
These are different operations: downloading retrieves bytes that already exist at a URL, while PDF() renders supported content from the current canvas screen.
Download an existing PDF with Download()
For a PDF that is already hosted, add a button and put this formula in its OnSelect property:
Download("https://example.com/file.pdf")
- Insert a Button control.
- Select the button and open the OnSelect property in the formula bar.
- Replace the example URL with the direct PDF address.
- Save and run the app, then select the button.
Microsoft documents Download as downloading a file from the web to the local device: Download function documentation. It can only be used in behavior formulas such as OnSelect, not in a label’s display formula.
Recommended Free Tools
#1 Best Overall
What users see on each platform
- Windows, Android, and iOS players: the user is prompted for a save location.
- Web browser: browser settings determine the result. A PDF commonly opens in a new tab, where the user can use the browser’s Save command.
Authentication and protected files
Download() does not sign in to SharePoint or another service on behalf of the URL. A protected link can therefore fail, particularly in a mobile player. A URL that redirects to a sign-in page, returns HTML, or requires request headers is not equivalent to a direct, anonymously retrievable PDF URL. For private documents, use a connector or flow that performs authentication rather than exposing the protected URL to Download().
Generate a PDF from a screen or control
Use PDF() when the PDF should be a snapshot of content rendered by the canvas app. Microsoft labels this function experimental. Enable it before using the formula:
- Open Settings.
- Choose Upcoming features.
- Open Experimental.
- Turn on PDF function.
Then place this in a button’s OnSelect:
PDF(SubmitInspectionScreen)
Replace SubmitInspectionScreen with your screen, container, or gallery. To retain the generated object for another control or action, store it in a variable:
Set(myPDF, PDF(SubmitInspectionScreen))
Options you can set
The function supports options for paper size, DPI, margins, orientation, and ExpandContainers. Use those when a report needs a particular page format or when containers must expand to include their content. The exact option record depends on the version of the PDF function exposed in your environment; check the formula suggestions after enabling the feature rather than assuming a web-only rendering model.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsRank #2
Scope and capacity limits
Generation happens on the device running the app. It captures content from the screen where it is invoked, and very large output can exceed the device’s available capacity. Unsupported controls or content may be missing or cause generation to fail. Test the same report on every device class you support, not only in Studio or a desktop browser.
Display a generated PDF inside the app
Insert the experimental PDF viewer control and set its Document property to the variable holding the PDF:
myPDF
A typical sequence is a Generate button with Set(myPDF, PDF(InspectionDetails)), followed by a viewer whose Document is myPDF.
Rules for hosted PDFs
If the viewer loads a hosted file instead of a generated object, its document source must be an HTTPS URL that directly serves the PDF and allows anonymous access. Redirects, an HTML document page, HTTP URLs, and restrictive CORS settings are unsupported. Printing is not supported. When the viewer cannot render a document, users can open it in an external browser where the server and browser handle the file.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Rank #3
See Microsoft’s PDF viewer control documentation for the control’s current behavior.
Email the generated PDF as an attachment
Add the Office 365 Outlook connector, then call SendEmailV2 from a button. The PDF object is supplied as attachment content:
Office365Outlook.SendEmailV2(
"[email protected]",
"PDF report",
"Attached is the generated report.",
{
Attachments: Table(
{
Name: "report.pdf",
ContentBytes: PDF(SubmitInspectionScreen)
}
)
}
)
Use a stable filename ending in .pdf. If the same PDF is also needed in the viewer or a flow, generate it once and store it:
Set(myPDF, PDF(SubmitInspectionScreen));
Office365Outlook.SendEmailV2(
"[email protected]",
"PDF report",
"Attached is the generated report.",
{ Attachments: Table({ Name: "report.pdf", ContentBytes: myPDF }) }
)
The Outlook connector must be authorized by the app user, and organizational policies can still block sending or external recipients.
Save a PDF to SharePoint with Power Automate
Use a flow when the file must persist in a document library rather than remain on a user’s device.
- Create an automated cloud flow with the PowerApps (V2) trigger.
- Add a File input and a text input for the file name.
- Add SharePoint’s Create file action.
- Select the site and document library, map the trigger’s file name to File name, and map its file content to File content.
- Save the flow, return to Power Apps, add the flow, and call it from a button.
Example canvas formula:
'PowerAppV2->Createfile'.Run(
"NewInspectionReport.pdf",
{
file: {
name: "NewInspectionReport.pdf",
contentBytes: PDF(InspectionDetails)
}
}
)
The SharePoint connection used by the flow needs permission to create files in that library. Confirm the library path and avoid duplicate names if users may submit the same report more than once.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshooting common failures
The Download button opens a sign-in page or does nothing
The URL is probably protected, redirects, or is not a direct PDF. Test it in a private browser window and use a connector or Power Automate for authenticated retrieval. Also check that a browser pop-up blocker is not preventing a new tab.
The PDF function is unknown
It is still disabled. Turn on Settings > Upcoming features > Experimental > PDF function, then reopen or refresh the editor if the formula remains underlined.
Best Value
The generated PDF is blank or incomplete
Make sure the target is the screen or supported control containing the data, and invoke PDF() after the data has loaded. Reduce unusually large galleries, test without unsupported controls, and try a lower DPI. Device-side capacity is a hard practical limit.
The PDF viewer shows an error for a URL
Verify HTTPS, anonymous access, a direct PDF response, no redirect, and permissive CORS. A SharePoint viewing page is not the same as a direct PDF URL. Use an external browser when the viewer’s requirements cannot be met.
The SharePoint flow fails
Check that the trigger has a File input (not only text), that the app passes both name and contentBytes, and that the flow’s SharePoint connection can write to the selected library.
Performance, reliability, and security decisions
- Generate once: store
PDF()in a variable when the same bytes are needed for viewing, email, and storage. - Keep reports bounded: long, image-heavy screens consume more device memory and take longer to render.
- Validate before download: display a clear error when a URL is missing or when a protected document requires authentication.
- Protect sensitive data: do not place private report URLs in a public control or rely on anonymous viewer access for confidential files.
- Test every target: browser, Windows, Android, and iOS can differ in save prompts, pop-up handling, and available memory.
Or skip the browser setup
If your goal is to capture a web page rather than export a Power Apps screen, ScreenshotNeo provides a website screenshot API and MCP server. One GET request returns a PNG, JPEG, WebP, or PDF. It accepts cookie and consent banners before removing more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status.
Free tools Windows power users keep installed
One-click scans. No signup required.
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)
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}`);
See the ScreenshotNeo documentation for request options. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
Frequently Asked Questions
Can Download() save a PDF directly into a SharePoint library?
No. Download() saves through the user’s device or browser. Use a Power Automate flow with SharePoint Create file for library storage.
Can I print from the Power Apps PDF viewer?
No. Printing is not supported by the PDF viewer; open the document in an external browser instead.
Does PDF() capture every control on every screen?
No. It captures supported content from the screen, container, or gallery you target, and generation is device-side.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




