Reputation: 7741
I copy-paste the source from this example: https://mozilla.github.io/pdf.js/web/viewer.html
My Code example (No docs so I follow the source code): https://codepen.io/ezra_siton/pen/bGdMPqe
I don't find any call to PDF url
under the official example (Filename is: compressed.tracemonkey-pldi-09.pdf
) + The docs missing + Zero examples out there (Codepen/Jfiddle).
I am searching for the most basic hello-world example (Very weird "unusable" docs for pdf.js
==> "can't see the forest for the trees").
The official examples here not helpful (Where is the UI bar?): https://mozilla.github.io/pdf.js/examples/
Upvotes: 2
Views: 3157
Reputation: 656
@Ezra
If your purpose of using it as a viewer plugin in your website/app. Please add the plugin to your website or web application and redirect the call to this snippet.
<a href="/web/viewer.html?file=%2Fyourpdf.pdf">Open yourpdf.pdf with PDF.js</a>
Additionally, you can refer for more information - https://github.com/mozilla/pdf.js/wiki/Setup-pdf.js-in-a-website
Upvotes: 0