Closed binishkaspar closed 9 years ago
@binishkaspar it's on purpose. There is a concern that end users mistake Firefox PDF Viewer with custom web site deployment, which will add support load to us. While we temporary package viewer.html in the release package (http://mozilla.github.io/pdf.js/getting_started/#download), we want to make it more customizable, different from demo/Firefox viewer, and simple to use.
We are slowly refactoring the viewer to provide set of embeddable APIs, so custom viewer can be easy deployed on a custom web site, also moving burden of the UI customization on web site developers. See web/pdf_viewer files and examples at https://github.com/mozilla/pdf.js/tree/master/examples/components and #5552
Closing as answered.
@yurydelendik Thanks for the update.
@yurydelendik I understand your concerns about not liking pdf-viewers on websites look like Firefox's pdf viewer, but can we have it until the "slow refactoring" is done some day?
It took me 2 hours to find out the pdfjs-dist
is incomplete I should download that zip file instead just to have that html file. Meanwhile I gave up pdf.js few times and tried to find an alternative because a pdf viewer library that forces you to implement and maintain the code for the pdf toolbar is not a really a pdf viewer library, it's more like a pdf renderer library. I mean there should be an easy way for users to have pdf.js work as a full pdf viewer out of the box (it's there just hidden in that zip file and "purposefully" removed from pdfjs-dist
.)
@yurydelendik I understand your concerns about not liking pdf-viewers on websites look like Firefox's pdf viewer, but can we have it until the "slow refactoring" is done some day?
It took me 2 hours to find out the
pdfjs-dist
is incomplete I should download that zip file instead just to have that html file. Meanwhile I gave up pdf.js few times and tried to find an alternative because a pdf viewer library that forces you to implement and maintain the code for the pdf toolbar is not a really a pdf viewer library, it's more like a pdf renderer library. I mean there should be an easy way for users to have pdf.js work as a full pdf viewer out of the box (it's there just hidden in that zip file and "purposefully" removed frompdfjs-dist
.)
Totally agree on this - had the same experience. Also, the documentation doesn't mention this anywhere. At least the FAQ should have an entry for this IMO, clearly stating that the viewer HTML file is not included on the packaged distribution.
Same here, it was frustrating to find this info only now!
Why not make the toolbar configurable, and looking like REALLY basic so that developers would skin it to their likings easily (or leave it be, but looking different than Firefox look)?
Can only support these people here! I understand that you don't want more support burden but the "slow move" seems to be a very slow move as this issue is already 6 years old now. I would love the idea of @ux-engineer !
And please add an info to the website stating this fact!
Please add this - spent 30 minutes just looking for this information - now I need to copy the entire source code over and somehow package it up - and right now the build isn't working. Does anyone have a working npm fork or a way to cleanly bundle this up?
Yes any tips please?! :)
Right now, we still need to 'readd' what is implemented in viewer.js - adding the release build directly via webpack gives me errors. I haven't got it working entirely so far I've been following this stackoverflow issue - https://stackoverflow.com/questions/53913361/react-and-pdf-js-changing-page-doesnt-work-when-i-render-whole-document. This works and you'll need to add an eventBus to the controller and viewer config like so const eventBus = new pdfjsViewer.EventBus();
. However, this does not give all the functionality of the viewer, all the viewer.js code needs to be copied over.
I don't mind using it as a renderer for thumbnails or within a slideshow, but would really appreciate the viewer.html being included in pdfjs-dist for the times when I DON'T want to re-create an entire viewer. Mozilla, if you don't want users to confuse the viewer within Firefox with the viewer as it is used in other apps, then I second the suggestion to make a theme change in either the one in Firefox, or the one that is built in pdfjs-dist. Something as simple as the background color of the toolbar might do the trick.
I wrote a GitHub Actions script to automate the building process: https://github.com/next-theme/theme-next-pdf/blob/main/.github/workflows/update.yml
who can really explain the logic to me for this? i just don't get it so i want to just use it through npm packages which is nice and easy to use for example in modern app dev (like angular) But then i don't have the viewer.hml that i can embed in an url
but the distribution zip download from here: https://github.com/mozilla/pdf.js/releases/download/v3.8.162/pdfjs-3.8.162-dist.zip has it just fine, so anybody who wants to use the viewer will then just use that one, so the end result is the same right?
" There is a concern that end users mistake Firefox PDF Viewer with custom web site deployment, which will add support load to us. "
So many did make all kind of support claims??
So currently the only way todo this is to copy it in your own stuff and then use it, but that is effectively exactly the same...
"While we temporary package viewer.html in the release package"
so 8 years is temp?
Viewer.html is missing in pre-built version pdfs-dist https://github.com/mozilla/pdfjs-dist