# Embedding printer settings in pdf

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?

-
This sound like its unlikely to be possible. Different operating systems handle printing in very different ways, and it seems to me like an undesirable feature in any case so it unlikely to be implemented. –  qubyte Nov 12 '11 at 2:31
this is true if you don't consider the fact that the reader of a certain filetype can decode and perform some tasks given by the file itself. If you open the same pdf with 2 times, the first time with Adobe Reader and the second time with another reader, you probably don't have the same features available even with the same file opened. –  Micro Nov 12 '11 at 2:56

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}%
}


## Update (by -kp-)

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).

-