Hello, I've been trying to make an editor in Power Apps for users to be able to update meta data on files whilest being able to view them; nearly everything works currently. nearly because i can't get any pdf to be displayed in the pdf-viewer.
At first I had been trying to convert docx files from my sharepoint environment to pdf to be viewed but never got any result so I decided to test if the pdf viewer could show me any pdf at all.
Even if I take a publicly accessible pdf on an https link such as this one for example it states 'can't open the pdf file - try opening it in your browser instead' (rougly translated because of language settings) opening in my browser naturally works but obviously I don't want to be using a pdf viewer to forward me to the browser.
so to sum it up; does this thing work at all or am I doing something wrong.
Solved! Go to Solution.
The problem is that the PDF viewer will only work with http:// (not https://) and only for non-authenticated addresses. So SharePoint docs are out on both counts. There is a workaround possible using Power Automate to generate the PDFs on the fly. You can see a full demonstration here by Paul Culmsee, a fellow MVP.
The problem is that the PDF viewer will only work with http:// (not https://) and only for non-authenticated addresses. So SharePoint docs are out on both counts. There is a workaround possible using Power Automate to generate the PDFs on the fly. You can see a full demonstration here by Paul Culmsee, a fellow MVP.
@Pstork1 and @eka24 thanks for taking the time to reply to my question. but have you experienced at your own hand recently that this worked? because i had already found these resources and tested them. but did not succeed which could very well mean that I did something wrong.
besides i'd like to point out that you are mistaken; it DOES require HTTPS not HTTP as you said (source )
(rough translation: PDF can't be opened - for security reasons files will only be opened through an HTTPS connection) this error shows when you attempt to open a pdf from an http link.
Its been a while since I used it, so I just looked at one of my old samples. It still works for me. But there are a number of limitations listed in the documentation. All 4 of them can be an issue, particularly with SharePoint. But Paul Culmsee's Flow solution should still work.
Limitations:
The security architecture of Power Apps requires the PDF Viewer to support only HTTPS links, not HTTP.
The Document property must link directly to the PDF file. Server redirects or HTML views of the document aren't supported.
The server that hosts the document must not require authentication.
You may not be able to view a PDF document in your app if the document resides on a server that has restrictive cross-origin resource sharing (CORS) settings. To resolve this issue, the server that hosts PDF documents must permit cross-origin requests from powerapps.com.
@Pstork1 thanks for taking the time to try to help.
I guess i'll just have to give Paul's solution another try.
This walkthrough by Laura Rogers, another MVP, might also help.
https://wonderlaura.com/2018/08/30/powerapps-pdf-viewer/
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
192 | |
47 | |
43 | |
39 | |
36 |
User | Count |
---|---|
284 | |
81 | |
80 | |
80 | |
71 |