PDF documents can request certain viewer configuration options on open, including:
These settings can be embedded as properties within a document, or requested as URL parameters - see http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_open_parameters.pdf
Many of these capabilities already exist in pdf.js so implementation should not be difficult?
#page=5&zoom=150,0,100
.pagemode
parameter, see #2676.search
, see #2485.I hope that the above sheds some light on the current state of URL parameters in pdf.js.
Thanks. But main thing is these parameters can be embedded in a document as well as via URLS and it would be good to respect that - particularly, for starters, the bookmarks/thumbs display setting.
Thanks. But main thing is these parameters can be embedded in a document as well as via URLS and it would be good to respect that - particularly, for starters, the bookmarks/thumbs display setting.
@BMSKiwi not sure what do you mean? http://mozilla.github.com/pdf.js/web/viewer.html#page=1&zoom=215,0,792 and http://mozilla.github.com/pdf.js/web/compressed.tracemonkey-pldi-09.pdf#page=5&zoom=215,0,792 work. So does http://download.intel.com/technology/computing/vptech/Intel(r)_VT_for_Direct_IO.pdf#G4.10628 . Please provide more information.
I see. So you just want to hide UI controls and set modes?
Look at these two modified versions of the test PDF
http://www.euroclass.co.nz/resources/compressed.tracemonkey-pldi-09-facing-bookmarks.pdf
http://www.euroclass.co.nz/resources/compressed.tracemonkey-pldi-09-singlepage-thumbs.pdf
Then look at them in Reader. I'm suggesting pdf.js follow that behaviour.
I would kill to be able to hide the toolbar and fit the document horizontally (view=FitH)
Quite an underrated feature...it would be nice to know if maintainers would approve a pull requests which makes PDF.js comply with the default pdf viewer parameters. Else I won't waste my time trying.
it would be nice to know if maintainers would approve a pull requests which makes PDF.js comply with the default pdf viewer parameters. Else I won't waste my time trying.
In general it's unfortunately not really possible for anyone to guarantee beforehand that a particular PR will be accepted (most PRs also require changes in response to review comments); especially not having seen a patch, nor knowing what it will contain and how the solution is expected to look.
@Snuffleupagus surely we cannot expect an acceptance-guarantee. 馃槃 Knowing that a pull request(if done properly and revised if necessary) will not be refused for being "out of scope" is enough to start developing. If necessary, the parameters could still be split into groups of acceptable, and non-acceptable ones.
@Snuffleupagus surely we cannot expect an acceptance-guarantee. 馃槃 Knowing that a pull request(if done properly and revised if necessary) will not be refused for being "out of scope" is enough to start developing. If necessary, the parameters could still be split into groups of acceptable, and non-acceptable ones.
From this reply I take that such a PR is not out of scope and was just not fully addressed yet. Will reference my toolbar PR here later which should resolve a part of this issue.
From this reply I take that such a PR is not out of scope and was just not fully addressed yet.
There's a lot of relevant discussion in PR #3815 as well, and that one was also ultimately closed; whether or not something like this will be accepted probably depends quite a bit on the complexity of the solution as well given that it's somewhat of an edge-case (and keeping in mind that code needs to be maintained too).
Most helpful comment
I would kill to be able to hide the toolbar and fit the document horizontally (view=FitH)