cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

Re: PDF Viewer Not Showing PDF

@tahoon@LanceDelano@erga,

 

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

Power Apps Staff tahoon
Power Apps Staff

Re: PDF Viewer Not Showing PDF

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...

 

wjhepworth
Level: Powered On

Re: PDF Viewer Not Showing PDF

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

Power Apps Staff tahoon
Power Apps Staff

Re: PDF Viewer Not Showing PDF

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

wjhepworth
Level: Powered On

Re: PDF Viewer Not Showing 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.

Power Apps Staff tahoon
Power Apps Staff

Re: PDF Viewer Not Showing PDF

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...

 

wjhepworth
Level: Powered On

Re: PDF Viewer Not Showing PDF

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

Highlighted
TopShelf-MSFT
Level 10

Re: PDF Viewer Not Showing PDF

@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 

@TopShelf-MSFT

tejaspatel82
Level: Powered On

Re: PDF Viewer Not Showing PDF - blocking production

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

zac1
Level: Powered On

Re: PDF Viewer Not Showing PDF

I get access denied when trying to access the above link

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,271)