evening,
I am trying to get the pdf viewer to work using a pdf that Excel 2016 has created. I just keep getting this message...
PDF.js v1.4.139 (build: 56f5c3a)
Message: Invalid PDF structure
can anyone help with this?
Karl
Hi Karl,
From this document we know that when we using PDF viewer control, an URL for the PDF file is needed.
https://powerapps.microsoft.com/en-us/tutorials/control-pdf-viewer/
What’s the URL being used?
I guess that your PDF file is saved in local. It seems that the PDF in local is not supported currently.
About this issue, may I suggest you submit an idea at PowerApps Ideas Fourm:
https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas
Best regards,
Mabel Mao
thanks for the reply Mabel,
The document is stored on Onedrive for business, and the link has been generated from there.
Karl
Hi Karl,
Thanks for your reply. If your PDF files are saved on OneDrive for Business, you could try this:
1. Open the PDF file in browser.
2. Click “Get link”
3. Click “Create”
4. Click “Copy”, click “Allow Access”.
5. In the app, add a PDF control, then set its Document property as “URL”.
Now, the PDF files are shown properly on my side. Please try my steps on your side to see if it works.
Best regards,
Mabel Mao
hi,
Thanks for that. Unfortunately, it didnt work.... still getting the same error message
Karl
Hi Karlkeegan,
Could you show me your URL? I test this again on my side, it works well.
I format an Excel file as a PDF file. Then upload it to OneDrive for Business. Below is how the PDF is shown on the app with different URL.
The first one with a wrong URL, so I get the same result with you:
PDF.js v1.4.139 (build: 56f5c3a)
Message: Invalid PDF structure
The second one with the right URL, so it can be shown on the app.
Please show me your URL, and if convenience, please show me your steps also to reproduce this issue.
Best regards,
Mabel Mao
Hi there,
apologies for the late reply. I am clicking on the file in onedrive, and then clicking get link. from here it opens a box, and I am creating an edit link which is as follows...
then opening PowerApps, adding a PDF Viewer control and putting this link (inside " ..")
still getting the same error message..
Karl
Hi Karl,
PDF Viewer supports files that are accessible anonymously. It looks like in your case the link requires the user to be authenticated. A good way to test it is to open your IE in private mode and try open the PDF file through that link. If the browser prompts you to sign in to O365 then that link won't work in the PDF Viewer. Here is an article that talks about how to create anonymous guest links:
https://support.office.com/en-us/article/Share-sites-or-documents-with-people-outside-your-organizat...
If you do require users to be authenticated to access the document, please add this feature request at https://aka.ms/powerapps-ideas
Thank you,
Irina
Thanks for that Irina,
That would explain why that's not working! can this be done from my personal onedrive? or Dropbox? I have tried both, and still getting the same result.
Karl
Update,
I have tried using googledrive public links, using link extender to extend the ondrive links from my personal onedive... not sure what to try next?
Karl
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
219 | |
212 | |
84 | |
57 | |
36 |