Difference between revisions of "PDF Print Options"

From Wiki
Jump to navigation Jump to search
(initial version)
 
m
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Duplex Printing =
+
==Background==
  
It is possible to specify the options for duplex printing in ConTeXt (beginning with beta from 2015.12.22 10:50) in the PDF document itself.
+
The PDF specification describes some options that may be included in documents to make printing easier when related to number of copies, paper size, scaling, print page range and duplex printing.
  
Duplex printing can be specified using the key option from the <code>\setupinteractionscreen</code> command.
+
At least for me, this was useful in two scenarios:
 +
 
 +
* At work, where we have a automated system for document generation. Users only have to press <code>Ctrl+P</code> and forget about which options are required for which documents.
 +
 
 +
* In copyshops, where duplex printing and no scaling were features that not everybody seemed to understand (or to handle) properly.
 +
 
 +
This feature requires a fairly recent beta version. As the time of this writing, 2016.06.20 22:14 was the lastest released version, although it has been implemented for some time.
 +
 
 +
== Duplex Printing ==
 +
 
 +
Duplex printing can be specified using the key <code>option=</code> from the <code>\setupinteractionscreen</code> command. (This option from the mentioned command allows multiple values. Except the number of copies, all other three print features are values for the <code>option</code> key.)
  
 
Possible values are:
 
Possible values are:
  
* <code>page</code>: enables single--sided printing (mandatory to disable duplex printing in a printer in which is set by default).
+
* <code>page</code>: enables single–sided printing (mandatory to disable duplex printing in a printer in which is set by default).
 
* <code>portrait</code> enables portrait duplex printing (the paper long side is flipped).
 
* <code>portrait</code> enables portrait duplex printing (the paper long side is flipped).
 
* <code>landscape</code> enables landscape duplex printing (the paper short side is flipped).
 
* <code>landscape</code> enables landscape duplex printing (the paper short side is flipped).
  
== Important Warning ==
+
==Print Scaling==
 +
 
 +
It is possible to disable print scaling in the document with the <code>fixed</code> value in the key <code>option=</code> from the <code>\setupinteractionscreen</code> command.
 +
 
 +
This may be a useful setting for printing documents where no content is placed on the margin area. ''Adobe'' products may shrink the content to printing area, ''whether this is required or not''. When the document has no content on the printer margins, resulting output will be smaller than it should.
 +
 
 +
==Paper Size From PDF Document==
 +
 
 +
Unless paper size is read from the PDF document, ''Acrobat'' will use the default paper size (A4 in Europe and letter in America).
 +
 
 +
<code>paper</code> is the value for the <code>option</code> key that specifies the selection of paper size from the document.
 +
 
 +
As explained before, <code>\setupinteractionscreen[portrait, fixed, paper]</code> would print duplex flipping the long side, no scaling and taking paper size from the PDF document.
 +
 
 +
==Number of Copies==
 +
 
 +
The number of copies is set with the <code>copies</code> key from <code>\setupinteractionscreen</code>.
 +
 
 +
Although the specification limits the number of copies to the maximum offered by the print dialog, ''Adobe'' limited the number to a maximum of five for security reasons.
 +
 
 +
==Print Page Range==
 +
 
 +
It is possible to print only a certain range of pages in the PDF document by specifying it with a workaround. A keyword is used to define the pages that are going to be printed, such as in:
 +
 
 +
# You specify the keyword that will be used for the print range, such as in <code>\setupinteractionscreen[print={usedname}]</code>.
 +
# Then, you mark the pages with that keyword. There are three ways of doing it. Either you write the pages with <code>\markpage[usedname][1,2,3,4]</code>, or you write the command <code>\markpage[usedname]</code> at the beginning of the page you want to be marked, or you mark the page range with <code>\startmarkpages[usedname]</code> and <code>\stopmarkpages</code>.
 +
 
 +
This requires a beta version starting from 2018.03.06 14:59.
  
By now, any form of duplex printing (included single--sided printing) disables the zoomed printing fit to page.
+
== Conformant PDF Readers ==
  
= Conformant PDF Readers =
+
To the best of my knowledge, only ''Adobe Acrobat'' (in both versions) from version 9 supports this feature.
  
To the best of my knowledge, only Adobe (Reader or not) from version 9 support this feature.
+
''Evince'' allows duplex options in its printing dialog, but it cannot read these from the PDF document. There is an open issue in poppler to [https://bugs.freedesktop.org/show_bug.cgi?id=92779 implement this feature].
  
evince allows duplex options in its printing dialog, but it cannot read these from the PDF document. There is an open issue in poppler to [https://bugs.freedesktop.org/show_bug.cgi?id=92779 implement this feature].
+
[[Category:Tools]]
 +
[[Category:PDF]]
 +
[[Category:Layout]]

Latest revision as of 15:09, 8 June 2020

Background

The PDF specification describes some options that may be included in documents to make printing easier when related to number of copies, paper size, scaling, print page range and duplex printing.

At least for me, this was useful in two scenarios:

  • At work, where we have a automated system for document generation. Users only have to press Ctrl+P and forget about which options are required for which documents.
  • In copyshops, where duplex printing and no scaling were features that not everybody seemed to understand (or to handle) properly.

This feature requires a fairly recent beta version. As the time of this writing, 2016.06.20 22:14 was the lastest released version, although it has been implemented for some time.

Duplex Printing

Duplex printing can be specified using the key option= from the \setupinteractionscreen command. (This option from the mentioned command allows multiple values. Except the number of copies, all other three print features are values for the option key.)

Possible values are:

  • page: enables single–sided printing (mandatory to disable duplex printing in a printer in which is set by default).
  • portrait enables portrait duplex printing (the paper long side is flipped).
  • landscape enables landscape duplex printing (the paper short side is flipped).

Print Scaling

It is possible to disable print scaling in the document with the fixed value in the key option= from the \setupinteractionscreen command.

This may be a useful setting for printing documents where no content is placed on the margin area. Adobe products may shrink the content to printing area, whether this is required or not. When the document has no content on the printer margins, resulting output will be smaller than it should.

Paper Size From PDF Document

Unless paper size is read from the PDF document, Acrobat will use the default paper size (A4 in Europe and letter in America).

paper is the value for the option key that specifies the selection of paper size from the document.

As explained before, \setupinteractionscreen[portrait, fixed, paper] would print duplex flipping the long side, no scaling and taking paper size from the PDF document.

Number of Copies

The number of copies is set with the copies key from \setupinteractionscreen.

Although the specification limits the number of copies to the maximum offered by the print dialog, Adobe limited the number to a maximum of five for security reasons.

Print Page Range

It is possible to print only a certain range of pages in the PDF document by specifying it with a workaround. A keyword is used to define the pages that are going to be printed, such as in:

  1. You specify the keyword that will be used for the print range, such as in \setupinteractionscreen[print={usedname}].
  2. Then, you mark the pages with that keyword. There are three ways of doing it. Either you write the pages with \markpage[usedname][1,2,3,4], or you write the command \markpage[usedname] at the beginning of the page you want to be marked, or you mark the page range with \startmarkpages[usedname] and \stopmarkpages.

This requires a beta version starting from 2018.03.06 14:59.

Conformant PDF Readers

To the best of my knowledge, only Adobe Acrobat (in both versions) from version 9 supports this feature.

Evince allows duplex options in its printing dialog, but it cannot read these from the PDF document. There is an open issue in poppler to implement this feature.