I want to produce a pdf that includes settings for a predefined profile, like the the printing on both side of a piece of paper, is that possible?
If a pdf does not provide this kind of feature, you some other file format that is able to?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityI want to produce a pdf that includes settings for a predefined profile, like the the printing on both side of a piece of paper, is that possible?
If a pdf does not provide this kind of feature, you some other file format that is able to?
There is a (not well documented) key in hyperref.sty
, called pdfduplex
. It can take one of three values according to ISO PDF specificaiton, section 12.1: Simplex
, DuplexFlipShortEdge
and DuplexFlipLongEdge
. Try this:
\documentclass{article}
\usepackage{lipsum}
\usepackage{hyperref}
\hypersetup{pdfduplex=DuplexFlipLongEdge}
\begin{document}
\lipsum
\end{document}
Other interesting keys are pdfprintarea
, pdfprintclip
, pdfprintscaling
, pdfpicktraybypdfsize
, pdfnumcopies
; see this code from the package where these keys are defined:
\Hy@DefNameKey{pdfprintarea}{%
\do{MediaBox}{}%
\do{CropBox}{}%
\do{BleedBox}{}%
\do{TrimBox}{}%
\do{ArtBox}{}%
}
\Hy@DefNameKey{pdfprintclip}{%
\do{MediaBox}{}%
\do{CropBox}{}%
\do{BleedBox}{}%
\do{TrimBox}{}%
\do{ArtBox}{}%
}
\Hy@DefNameKey{pdfprintscaling}{%
\do{AppDefault}{}%
\do{None}{}%
}
\Hy@DefNameKey{pdfduplex}{%
\do{Simplex}{}%
\do{DuplexFlipShortEdge}{}%
\do{DuplexFlipLongEdge}{}%
}
\Hy@DefNameKey{pdfpicktraybypdfsize}{%
\do{true}{}%
\do{false}{}%
}
\define@key{Hyp}{pdfprintpagerange}{%
\def\@pdfprintpagerange{#1}%
}
\Hy@DefNameKey{pdfnumcopies}{%
\do{2}{two copies}%
\do{3}{three copies}%
\do{4}{four copies}%
\do{5}{five copies}%
}
Please note, that any of these embedded settings do not directly influence the print outcome at all, and they do give you control over the behavior of the print device. They only do influence 'the preset values used to populate the print dialog presented by a conforming reader' (as is spelled out somewhere in section 12.1 of the ISO spec for PDF-1.7).
It means that the PDF viewer popping up its print dialog should have the respective values pre-selected. As a user I could still select different values for the actual printing. Also, as a user I can usually set up my viewer application to 'ignore document presets' ...
In other words, this (rather limited) functions will likely only work on Windows, and if you print the PDF using the print dialogs of Acrobat Pro (or Adobe Reader).