Document -center-to-fit

This commit is contained in:
John Whitington 2024-10-31 15:26:16 +00:00
parent 86ce23bd90
commit d81063d764
2 changed files with 15 additions and 10 deletions

Binary file not shown.

View File

@ -1,4 +1,3 @@
% Document -center-to-fit
\documentclass{book} \documentclass{book}
% Edit here to produce cpdfmanual.pdf, cpdflibmanual.pdf, pycpdfmanual.pdf, % Edit here to produce cpdfmanual.pdf, cpdflibmanual.pdf, pycpdfmanual.pdf,
% dotnetcpdflibmanual.pdf, jcpdflibmanual.pdf jscpdflibmanual.pdf etc. % dotnetcpdflibmanual.pdf, jcpdflibmanual.pdf jscpdflibmanual.pdf etc.
@ -1438,6 +1437,9 @@ The \texttt{-process-struct-trees} option used in conjunction with any splitting
\vspace{1.5mm} \vspace{1.5mm}
\small\noindent\verb!cpdf -stretch "<x size> <y size>" [-fast] in.pdf [<range>] -o out.pdf! \small\noindent\verb!cpdf -stretch "<x size> <y size>" [-fast] in.pdf [<range>] -o out.pdf!
\vspace{1.5mm}
\small\noindent\verb!cpdf -center-to-fit "<x size> <y size>" in.pdf [<range>] -o out.pdf!
\vspace{1.5mm} \vspace{1.5mm}
\small\noindent\verb!cpdf -scale-contents [<scale>] [<position>] [-fast]!\\ \small\noindent\verb!cpdf -scale-contents [<scale>] [<position>] [-fast]!\\
\noindent\verb! in.pdf [<range>] -o out.pdf! \noindent\verb! in.pdf [<range>] -o out.pdf!
@ -1466,19 +1468,12 @@ The \texttt{-process-struct-trees} option used in conjunction with any splitting
\vspace{1.5mm} \vspace{1.5mm}
\small\noindent\verb!cpdf -vflip [-fast] in.pdf [<range>] -o out.pdf! \small\noindent\verb!cpdf -vflip [-fast] in.pdf [<range>] -o out.pdf!
\vspace{1.5mm}
\small\noindent\verb!cpdf -mediabox <boxspec> in.pdf [<range>] -o out.pdf!
\vspace{1.5mm} \vspace{1.5mm}
\small\noindent\verb!cpdf -cropbox <boxspec> in.pdf [<range>] -o out.pdf! \small\noindent\verb!cpdf -[media|crop|art|trim|bleed]box <boxspec> in.pdf [<range>] -o out.pdf!
\vspace{1.5mm} \vspace{1.5mm}
\small\noindent\verb!cpdf -remove-cropbox in.pdf [<range>] -o out.pdf! \small\noindent\verb!cpdf -remove-[crop|art|trim|bleed]box in.pdf [<range>] -o out.pdf!
\vspace{1.5mm}
(Also \texttt{-bleedbox}, \texttt{-artbox}, \texttt{-trimbox} and \texttt{-remove-bleedbox}, \texttt{-remove-artbox}, \texttt{-remove-trimbox}.)
\vspace{1.5mm} \vspace{1.5mm}
\small\noindent\verb!cpdf -frombox <boxname> -tobox <boxname> [-mediabox-if-missing]! \\ \small\noindent\verb!cpdf -frombox <boxname> -tobox <boxname> [-mediabox-if-missing]! \\
@ -1563,6 +1558,16 @@ Y factors given. This scales both the page contents, and the page size itself. I
\noindent Scale a file's pages and their content to fit A4 landscape. \noindent Scale a file's pages and their content to fit A4 landscape.
\end{framed} \end{framed}
\noindent The \texttt{-center-to-fit} operation changes the page size without scaling the contents. It centers the old page on the new page.
\begin{framed}
\small\noindent\verb!cpdf -center-to-fit a3portrait in.pdf -o out.pdf!
\vspace{2.5mm}
\noindent Set a file's pages to the given size and center the content.
\end{framed}
\noindent The \texttt{-scale-contents} operation scales the contents about the center \noindent The \texttt{-scale-contents} operation scales the contents about the center
of the crop box (or, if absent, the media box), leaving the page dimensions of the crop box (or, if absent, the media box), leaving the page dimensions
(boxes) unchanged. (boxes) unchanged.