Notifications
Announcements
Hi folks,
I have a Power Automate flow that returns a PDF as a Base64 string to my Power App. I want to use the Launch() function to open this Base64 string in a new browser tab to display or download the PDF. Unfortunately, I can’t get it to work so far, despite no errors being reported by Power Apps.
Here is my current OnSelect code for the button that triggers the Flow and attempts to open the PDF:
UpdateContext({locLoadingPDF: true}); UpdateContext( { locPDFBase64: 'WeighbridgeTickets-GeneratePDFofTicket'.Run( ThisItem.'Docket Number', ThisItem.'Client Name', ThisItem.'Material Direction', ThisItem.'Source Site or Destination', ThisItem.'EWC Code', ThisItem.Haulier, ThisItem.'Vehicle Registration', If(IsBlank(ThisItem.Comments), "", ThisItem.Comments), ThisItem.'1st Weight', ThisItem.'1st Weight Date/Time', ThisItem.'2nd Weight', ThisItem.'2nd Weight Date/Time', ThisItem.'2nd Weight Operator', ThisItem.'Net Weight' ) } ); UpdateContext({locLoadingPDF: false}); // Attempt to launch the PDF Launch(locPDFBase64.pdfbase64);
Manual Pasting: If I set a Label’s Text property to locPDFBase64.pdfbase64 and copy/paste that entire data URI (data:application/pdf;base64,JVBERi0x...) into a new Chrome tab, it works and shows the PDF correctly.
locPDFBase64.pdfbase64
data:application/pdf;base64,JVBERi0x...
Separate Launch Button: Tried using a separate button that just calls Launch(locPDFBase64.pdfbase64) after the Flow’s variable is populated—still doesn’t launch.
Launch(locPDFBase64.pdfbase64)
Monitor Logs: The Flow runs successfully and returns the PDF Base64. No errors appear in the Monitor. Below is a snippet of the response:
{ "duration": 9010.69, "size": 207892, "status": 200, "headers": { "Cache-Control": "no-cache", "content-encoding": "gzip", "Content-Type": "application/json; charset=utf-8", "Date": "Sat, 04 Jan 2025 16:24:43 GMT", "expires": -1, "pragma": "no-cache", "strict-transport-security": "max-age=31536000; includeSubDomains", "timing-allow-origin": "*", "vary": "Accept-Encoding", "x-ms-apihub-cached-response": true, "x-ms-apihub-obo": false, "x-ms-client-tracking-id": "08584655990094421372403946145CU12", "x-ms-correlation-id": "b7c0bce1-f21c-4070-bb5f-eda5757b8810", "x-ms-dlp-gu": "-|-", "x-ms-dlp-re": "-|-", "x-ms-environment-id": "38e07919-055b-e52f-b0cc-6a471e46f8a4", "x-ms-error-type": "UnknownError", "x-ms-execution-location": "uksouth", "x-ms-ratelimit-burst-remaining-workflow-writes": 1729, "x-ms-ratelimit-remaining-workflow-download-contentsize": 123684844, "x-ms-ratelimit-remaining-workflow-upload-contentsize": 123892246, "x-ms-ratelimit-time-remaining-directapirequests": 11530895, "x-ms-request-id": "uksouth:b7c0bce1-f21c-4070-bb5f-eda5757b8810", "x-ms-tenant-id": "ccc263eb-4651-422e-a65b-2544ed58eada", "x-ms-tracking-id": "b7c0bce1-f21c-4070-bb5f-eda5757b8810", "x-ms-trigger-history-name": "08584655990094421372403946145CU12", "x-ms-workflow-id": "7faab504132a42b79b7027e15f61eecb", "x-ms-workflow-name": "23b8384e-6a8d-4e6b-96a2-1563922a46bb", "x-ms-workflow-run-id": "08584655990094421372403946145CU12", "x-ms-workflow-system-id": "/locations/uksouth/scaleunits/prod-20/workflows/7faab504132a42b79b7027e15f61eecb", "x-ms-workflow-version": "08584656510578608945" }, "body": { "pdfbase64": "data:application/pdf;base64,JVBERi0xLjcNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFIvTGFuZyhlbikg......" }, "responseType": "json" }
Has anyone encountered this issue or found a reliable workaround? I’ve seen suggestions like using Download() or temporarily storing the PDF in SharePoint, but I really prefer a direct “open in new tab” approach if possible.
Any advice would be greatly appreciated!
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 739 Most Valuable Professional
Michael E. Gernaey 343 Super User 2025 Season 2
Power Platform 1919 268