extended printing features?
See original GitHub issueI’d rather ask this question in advance to know whether it makes sense to report the individual issues.
All of them are related to printing. For (almost) all of them, a new printing dialog would be needed.
PDF.js prints the file fine when the page size the PDF document uses is the same as the paper size in the printer.
There are other options that PDF.js should implement:
-
Shrink page contents to printer margins. It would be better that this option is triggered only when minimization is really needed. (Already reported in #8832).
-
Use document paper dimensions.
-
Print in duplex or simplex mode.
These are also keys in the /ViewerPreferences
dictionary:
-
/PrintScaling /None
disables page scaling to fit printer margins. -
/PickTrayByPDFSize true
sets paper size from PDF document not from printer (essential when having to print with different paper sizes fed from paper tray). -
/Duplex
which can have three possible values:-
/DuplexFlipShortEdge
for vertical duplex printing. -
/DuplexFlipLongEdge
for horizontal duplex printing. -
/Simplex
for single-sided printing (important when printer is set by default to duplex printing).
-
The implementation would be twofold:
-
Read the information from the
/ViewerPreferences
and print accordingly. -
Add a printing dialog (such as other viewers have) that allows the user to select those options.
Could be these features implemented in PDF.js?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
The challenge here is to actually send that data to the browser’s print dialog/the printer. As far as I know there is no way to control e.g., the paper dimensions through JavaScript. Before attempting to implement this, I’d suggest to first look into if all this is even possible with JavaScript, mainly because we had issues with it before. Keep cross-browser support in mind as well.
Not only would that make user experience between the various builds inconsistent, it’s also not something we can fix here and should be filed upstream in Bugzilla then.