next up previous contents index
Next: Shift Page Contents Up: Pages Previous: Page sizes   Contents   Index


Scale Pages

The -scale-page operation scales each page in the range by the X and Y factors given. This scales both the page contents, and the page size itself. It also scales any Crop Box and other boxes (Art Box, Trim Box etc). As with several of these commands, remember to take into account any page rotation when considering what the X and Y axes relate to.


\begin{framed}
\small\noindent\verb!cpdf -scale-page ''2 2'' in.pdf -o out.pdf!...
...
\vspace{2.5mm}
\noindent Convert an A4 page to A3, for instance.
\end{framed}

The -scale-to-fit operation scales each page in the range to fit a given page size, preserving aspect ratio and centering the result.


\begin{framed}
\small\noindent\verb!cpdf -scale-to-fit ''297mm 210mm'' in.pdf -...
...\vspace{2.5mm}
\noindent Scale a file's pages to fit A4 portrait.
\end{framed}
The -scale-to-fit-best and -scale-to-fit-minus are similar, but will rotate a page by $90^\circ$ or $-90^\circ$ respectively on any page where doing so would maximise the scale.

The scale can optionally be set to a percentage of the available area, instead of filling it, when using any of the three operations.
\begin{framed}
\small\noindent\verb!cpdf -scale-to-fit a4portrait -scale-to-fit...
...es to fit A4 portrait, scaling the page 90\% of its possible size.
\end{framed}

The -scale-contents operation scales the contents, leaving the page dimensions unchanged. The position of the scaled content in the output can be specified using the same postional operators used when adding text (See position).


\begin{framed}
\small\noindent\verb!cpdf -scale-contents 0.5 -topleft 10mm in.p...
...dimensions, placing the result 10mm from the top left of the page.
\end{framed}


next up previous contents index
Next: Shift Page Contents Up: Pages Previous: Page sizes   Contents   Index
root 2008-12-01