Copy link to clipboard
Copied
Hello,
I am trying out the PDF Embed API. It has mostly been great, but I am encountering an issue of opening documents on mobile.
Attached are two screenshots, one from desktop which works perfectly. And on mobile (at least Android), which gets stuck on "Opening Document 100%" until eventually quitting.
This website is open source, you can see the code here:
TheAntiCarCollective.github.io/pages/modules/links.ts at a37710ac6ef7c5c84e99433c47e04308cf1a1418 · ...
A link to test with:
https://anticar.org/?link=PdfLink-justin-tyndall-the-effect-of-front-end-vehicle-height-on-pedestria...
The PDF it's pulling:
justin-tyndall-the-effect-of-front-end-vehicle-height-on-pedestrian-death-risk.pdf (anticar.org)
Any leads would be appreciated. Thank you.
That indeed was the problem. So the solution is to either not have
hasReadOnlyAccess: true
or, if you do, make sure you have
showAnnotationTools: false
For previewFile options (second parameter). Known working version:
TheAntiCarCollective.github.io/pages/modules/links.ts at 9e0a9082ecc62915858804890018a2ce89cc3f3a · TheAntiCarCollective/TheAntiCarCollective.github.io
Copy link to clipboard
Copied
Something interesting I just discovered is that when I set the browser to emulate a mobile device I see a new error:
Commenting is not enabled in this document.
Is this because I have:
hasReadOnlyAccess: true
?
And if so, is that intended?
Copy link to clipboard
Copied
That indeed was the problem. So the solution is to either not have
hasReadOnlyAccess: true
or, if you do, make sure you have
showAnnotationTools: false
For previewFile options (second parameter). Known working version:
TheAntiCarCollective.github.io/pages/modules/links.ts at 9e0a9082ecc62915858804890018a2ce89cc3f3a · ...