cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Maexchen Helper II
Helper II

PDF viewer not working

I have used this tutorial to convert a file into PDF online and then try to show that PDF in my app

http://www.cleverworkarounds.com/2018/06/30/some-seriously-powerful-and-free-pdf-functionality-in-po...

 

But all I get is a grey box that states "Couldn't open PDF file", with a Link underneath "Open in my Browser instead" which works perfectly. I.e. the URL I give to the PDF viewer is definitely correct. 

 

The file I'm converting is a HTML file sitting in a Sharepoint Document Library. I'm working for a large corporation so I believe we are in a dedicated environment. Anyone got an idea what causes this issue and/or how to overcome it.

1 ACCEPTED SOLUTION

Accepted Solutions
MasterOffice365 Advocate II
Advocate II

Re: PDF viewer not working

This following one statement in the Document property on a PDF Viewer control will dynamically convert many document types to PDF you can display in your apps such as Word documents, PowerPoint presentations, HTML files. Loads more.

Substitute( Gallery1.Selected.Thumbnail, "transform/thumbnail", "transform/pdf" )

 

There is a more consistent way of doing it with PDF documents using the Graph APIs which surface a "@content.downloadUrl" property for any file, but this property in particular works 100% of the time, and once again you only need to set the Document property on the PDF Viewer to this field using the PA_Graph_DriveItems Flow I've shared on a really long blogs that speaks to loads more things you equally do using those APIs. 

 

Rather download the simplified version of demo app I've shared on that blog, and all the other Flows if you want to:

https://youtu.be/poKsDNYm9Jw

https://masteroffice365.com/powerapps/9/#DownloadSolution

 

View solution in original post

18 REPLIES 18
BungleBrain Helper I
Helper I

Re: PDF viewer not working

If your PDF lives on SharePoint, it requires an extra step of authentication so isn't currently supported.

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-pdf-viewer

Unless something has changed since last time I tried it. I'd love for this to work natively - seeing as I suspect most of us store documents like that on SharePoint!

 

Edited to say - sorry I saw your link has attempted to tackle this issue directly. I've not tried that approach, so not sure what problems there might be.

Maexchen Helper II
Helper II

Re: PDF viewer not working

thanks, that's annoying. The tutorial I used seems to suggest that it works. 

 

Community Support
Community Support

Re: PDF viewer not working

Hi @Maexchen ,

 

Check if below video could help:

https://powerusers.microsoft.com/t5/Videos/Real-World-PowerApps-How-to-view-SharePoint-PDF-s-in-Powe...

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Maexchen Helper II
Helper II

Re: PDF viewer not working

thanks, but I can't try that because "response" is now a premium connector and the "flow response connector" does not have headers (which I believe might have been the answer to my issue).

 

Anyone else got an idea or can confirm that they have this working?

Community Support
Community Support

Re: PDF viewer not working

Hi @Maexchen ,

 

If you do not have the access to premium connectors then I'm afraid that this cannot be achieved so far. Sorry for the inconvenience.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Maexchen Helper II
Helper II

Re: PDF viewer not working

The original tutorial I worked off seems to work for some, so I'm not ready to give up yet.

 

On the topic of the premium connectors: this is a really bad move from MS, how can I be confident that the app I'm building today is working tomorrow if they randomly make connectors premium that used to be free?

Community Support
Community Support

Re: PDF viewer not working

Hi @Maexchen ,

 

Sorry for the inconvenience. For feedback of PowerApps, please post your comments in below forum:
https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Maexchen Helper II
Helper II

Re: PDF viewer not working

thanks, but I see that as a waste of time. There are good ideas in there that have a lot of support and yet since three years there have been no official reactions to them. what's the point of having that section then?

 

I've actually stopped developing my idea, I just run into one road block after an other and every time I started running again there was just another. 

BungleBrain Helper I
Helper I

Re: PDF viewer not working

I have to admit I came back to Power Apps after about a years break, and am sad to still find you can't easily view PDFs that are stored on SharePoint.

Given the "Citizen Developer" mantra, and that I am guessing most citizen developers are storing their PowerApps data in SharePoint lists etc., the inability to view documents within Power Apps which are stored on SharePoint is aggravating.

Seems the idea is still "planned" as per:

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/PDF-Viewer-support-for-PDF-documents-in-Sharepo...

There does seem to be some discussion in there about workarounds but I am yet to try them.

 

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (6,627)