[[Category:PDF]]
== Reformatting a Single-Sided pdf for Double-Sided Printing ==
Context can be used as a pdf postprocessor.
This example takes an original single-sided document and applies differing horizontal offsets to odd and even pages. This simultaneously
* compensates for the fixed offset in the original, and
* introduces a new alternating one as required for double-sided printing
It is useful for printing reference manuals downloaded from the web.
<texcode>
% replace "Manual" with the name of your original pdf
\define\MySingleSidedDocument{Manual}
% can adjust topspace to move page etc
\setuplayout[\MySingleSidedDocument,topspace=1cm,header=0cm,backspace=0cm]
% suppress page numbering
\setuppagenumbering[location=]
\starttext
\getfiguredimensions[\MySingleSidedDocument]
\dorecurse\noffigurepages
{\hbox to \textwidth
{\ifodd\recurselevel
%adjust number to set odd page horizontal position
\hskip-0.1cm\externalfigure[\MySingleSidedDocument][page=\recurselevel]\hss
\else
%adjust number to set even page horizontal position
\hskip-1.8cm\externalfigure[\MySingleSidedDocument][page=\recurselevel]\hss
\fi}}
\stoptext
</texcode>