I have used this tutorial to convert a file into PDF online and then try to show that PDF in my app
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.
Solved! Go to Solution.
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:
If your PDF lives on SharePoint, it requires an extra step of authentication so isn't currently supported.
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.
Hi @Maexchen ,
Check if below video could help:
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?
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.
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?
Hi @Maexchen ,
Sorry for the inconvenience. For feedback of PowerApps, please post your comments in below forum:
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.
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:
There does seem to be some discussion in there about workarounds but I am yet to try them.