cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PAB
Advocate III
Advocate III

PDF Viewer Not Showing PDF

I have tried the following ways to get the PDF Viewer to work:

1. Uploading it in the assets portion (worked in browser, but did not work on phone)

2. Store it to https link and click the link (get the following error message: Couldn't open PDF file)

However no matter what I do I am unable to actually get the pdf visible in the app on my Iphone.

ErrorMsgPdfViewer.PNG

Has anyone been successful in doing this? Please help and provide any ways that you have gotten it visible.

50 REPLIES 50
martinav
Resident Rockstar
Resident Rockstar

@tahoon@LanceDelano@erga,

 

Refreshing this post.  The direction of my app depends on this issue being resolved.

In general, the PDF Viewer cannot load authenticated PDFs. Under the hood, the app is running on PowerApps domain, so special measures are needed to fetch data from other domains like Sharepoint. PowerApps handles Sharepoint data types like text and numbers with a particular mechanism.

 

For PDFs, this related post might be relevant. https://powerusers.microsoft.com/t5/Connecting-to-Data/How-to-open-sharepoint-PDFs-in-PowerApps/td-p...

 

Tahoon,

 

I may have missed this in another thread but has anybody considered just letting the PowerApps developer just hand the control the PDF content?  It is puzzling to me why you went the URL route when it opens so many potential security and connectivity challenges.  Any chance we can get a property or a method that allows us to simply upload the bits directly to the PDF?  This would be far more secure than forcing us to leave PDFs out in the open for anybody to get.  Frankly, it seems easier to code on your end as well.

 

Was this already a recommendation?  Perhaps I just missed it.

 

-Bill

I am not sure I understand. Can you give an example of what it means to upload bits directly to PDF?

Background: So I am using PowerApps to connect to an Azure function that generates a PDF.  This Azure function could directly hand the caller the full stream of the PDF.  Unfortunately, PowerApps PDF Viewer cannot handle the PDF directly -- it wants a URL to an anonyous (read unprotected) URI.

 

Problem: Becuase we cannot give the PDF Viewer the stream we to give it a URL to an unauthenticated container.  Just saying that to you sounds very frightening.  There are mitigations such as Shared Access tokens but they are not hack proof.

 

Solution: Use a property similar to HTMLText property of the PowerApps HTML Text Control.  Let us load the PDF content into a table or record and present it directly to a property called PDFContent.  This is the single most secure approach to this because then we can at least be sure only the user we are intending to give the PDF to has access.

Unfortunately, the PDF Viewer does not support reading byte streams directly. Even if the PDF is generated, it requires a URL to be supplied. Authenticated PDFs are not supported in general, the exception being Sharepoint. Check this thread for more about displaying PDFs from Sharepoint. https://powerusers.microsoft.com/t5/Connecting-to-Data/How-to-open-sharepoint-PDFs-in-PowerApps/td-p...

 

Right, that is what I was saying.  It is not presently supported; however, would be a great feature to add for security purposes.

Anonymous
Not applicable

@wjhepworth Our PowerApp Ideas Board would be a great place for your feature Idea, Submit your Idea Here

 

The PowerApp team looks to this board for ideas and feedback. 

Thanks 

@Anonymous

I am facing same issue.

 

pdf is loading in create mode but not in published mode

 

any help would be really appreciated. my Session ID: 876be4df-c6ea-47a9-ab43-ddac319559ed
PowerApps 3.18102.22

I get access denied when trying to access the above link

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (37,731)