Hello
I am working on a Powerapp where i use the PDF viewer to pull up PDF files from sharepoint. The Left column where you can select which PDF file to look at works fine. The problem arises when you click on the file and a blackish grey screen shows. So basically nothing shows up lol
Not sure what to do from here. I attached a snip of the small error that shows up but not sure if its connected.
The PDF viewer only works with files served from an anonymous access location. So it normally won't work with files hosted in SharePoint. The link below provides a workaround for how to use Power Automate to display PDF files from SharePoint in Power Apps.
Hi @Anon622 ,
Do you want to preview the PDF file stored in your SP Library inside your canvas app?
Do you type the SP URL Link of your PDF file within the Document property of the PDF Viewer control directly?
If you want to preview the PDF file stored in your app SP Library inside your canvas app, I think the combination of Power Automate flow and PowerApps canvas app could achieve your needs. Please check and see if the following blog could help in your scenario:
https://masteroffice365.com/viewing-pdfs-from-sharepoint-within-powerapps/
Also please consider check the following video resource:
Regards,
Hello Thats unfortunate. Would it be easier if perhaps we could convert the PDF file to an image like a JPG?
Seems crazy that we have to go through so many steps just to 'view' a PDF off sharepoint
Picture controls will show the JPG just fine coming from an authenticated SharePoint library. But you will lose a lot of control for things like scaling, paging etc. that is built into the PDF viewer.
Hi @Anon622 ,
Do you want to convert the PDF file into a image?
I agree with @Pstork1 's thought almost. The Image control in canvas app could not display a PDF file with same functionality as the PDF Viewer control. e.g. The pagination functionality is not supported in Image control.
It is an known issue in canvas app -- when displaying image file/PDf file which needs authentication from SP Library in a canvas app, you may not display it correctly. As an fixed solution, you could consider retrieve the file content (binary data) of the PDf file, then you could display it in your canvas app.
As an possible solution, please try the solution I provided above to achieve your needs. The video resource I provided above may help in your scenario.
Regards,
Hello Yes I want the pdf to show/display when i click on it within a PDF viewer. We are going to have biweekly reports. I am having a problem with the first steps in the video you referred me to.
I am unable to match/find the trigger that they mention in the video. Its called "Request - When a HTTP request is received".
For now I am using one of the triggers that is specifically for Sharepoint. For the time being I elected "Sharepoint - When a file is created in the folder"
Which trigger is best?
The HTTP trigger is so you can invoke the flow from a Power Apps form. The automated trigger you've selected will try to display the PDF when it is received. But at that point there is no one to display it to. Here's how to find the trigger you want. Please Note: it does require a Premium license
Hi @Anon622 ,
Regarding the needs that you mentioned, I think it is not necessary to add a "Request - When a HTTP request is received" trigger in your flow.
As an easy solution, I think the "PowerApps" trigger button could achieve your needs. The "PowerApps" trigger button is designed specially for Power Apps and Power Automate, which is used to pass parameters from canvas app to your Power Automate flow.
More details about firing a flow from a canvas app, please check the following video resource:
https://www.youtube.com/watch?v=1wl9AtxWdkg
https://www.youtube.com/watch?v=HhMpAuVGfho
Please refer to the following blog (which has given a step by step solution) to achieve your needs:
https://masteroffice365.com/viewing-pdfs-from-sharepoint-within-powerapps/
If above solution is helpful, please consider go ahead to click "Accept as Solution" to identify my reply as helpful.
Regards,
Hello
Thanks for clarifying, Before I reach out to the employer for Premium licensing will this work for what I'm aiming to do?
Just need the PDF to show/display via the PDF viewer. The reports will come in bi-weekly. Someone will drop in a new report in the Sharepoint list every 2 weeks. I won't have to update the flow to accommodate that right?
User | Count |
---|---|
125 | |
87 | |
86 | |
75 | |
69 |
User | Count |
---|---|
216 | |
181 | |
140 | |
97 | |
83 |