Finished documenting new commands
This commit is contained in:
parent
1b9ca3c254
commit
27a7278fe7
|
@ -1444,6 +1444,9 @@ and specs =
|
||||||
("-stamp-under",
|
("-stamp-under",
|
||||||
Arg.String setstampunder,
|
Arg.String setstampunder,
|
||||||
" Stamp a file under some pages of another");
|
" Stamp a file under some pages of another");
|
||||||
|
("-scale-stamp-to-fit",
|
||||||
|
Arg.Unit setscalestamptofit,
|
||||||
|
" Scale the stamp to fit the page");
|
||||||
("-combine-pages",
|
("-combine-pages",
|
||||||
Arg.String setcombinepages,
|
Arg.String setcombinepages,
|
||||||
" Combine two files by merging individual pages");
|
" Combine two files by merging individual pages");
|
||||||
|
@ -1735,7 +1738,7 @@ and specs =
|
||||||
(* These items are for cpdftk *)
|
(* These items are for cpdftk *)
|
||||||
("-update-info", Arg.String setupdateinfo, "");
|
("-update-info", Arg.String setupdateinfo, "");
|
||||||
("-printf-format", Arg.Unit setprintfformat, "");
|
("-printf-format", Arg.Unit setprintfformat, "");
|
||||||
("-scale-stamp-to-fit", Arg.Unit setscalestamptofit, "");
|
|
||||||
("-dump-data", Arg.Unit (setop DumpData), "");
|
("-dump-data", Arg.Unit (setop DumpData), "");
|
||||||
("-keep-this-id", Arg.Unit setkeepthisid, "");
|
("-keep-this-id", Arg.Unit setkeepthisid, "");
|
||||||
("-do-ask", Arg.Unit setdoask, "");
|
("-do-ask", Arg.Unit setdoask, "");
|
||||||
|
|
BIN
cpdfmanual.pdf
BIN
cpdfmanual.pdf
Binary file not shown.
|
@ -402,7 +402,8 @@ displayed on the screen. When a bad or inappropriate password is given, the exit
|
||||||
\section{Control Files}
|
\section{Control Files}
|
||||||
\index{control file}
|
\index{control file}
|
||||||
\begin{framed}
|
\begin{framed}
|
||||||
\noindent\small\verb!cpdf -control <filename>!
|
\noindent\small\verb!cpdf -control <filename>!\\
|
||||||
|
\noindent\small\verb!cpdf -args <filename>!
|
||||||
\end{framed}
|
\end{framed}
|
||||||
|
|
||||||
Some operating systems have a limit on the length of a command line. To
|
Some operating systems have a limit on the length of a command line. To
|
||||||
|
@ -415,7 +416,10 @@ may be used to introduce a genuine quotation mark in such an argument.
|
||||||
Several \verb!-control! arguments may be specified, and may be mixed in with
|
Several \verb!-control! arguments may be specified, and may be mixed in with
|
||||||
conventional command-line arguments. The commands in each control file are
|
conventional command-line arguments. The commands in each control file are
|
||||||
considered in the order in which they are given, after all conventional
|
considered in the order in which they are given, after all conventional
|
||||||
arguements have been processed.
|
arguments have been processed. It is recommended to use \texttt{-args} in all new applications. However, \texttt{-control} will be supported for legacy applications.
|
||||||
|
|
||||||
|
To avoid interference between \texttt{-control} and \texttt{AND}, a new mechanism has been added. Using \texttt{-args} in place of \texttt{-control} will perform direct textual substitution of the file into the command line, prior to any other processing.
|
||||||
|
|
||||||
|
|
||||||
\section{String Arguments}
|
\section{String Arguments}
|
||||||
Command lines are handled differently on each operating system. Some
|
Command lines are handled differently on each operating system. Some
|
||||||
|
@ -1153,6 +1157,8 @@ writing to \texttt{out.pdf}. A watermark should go underneath each page:
|
||||||
|
|
||||||
\noindent The position commands in \Sref{position} can be used to locate the stamp more precisely (they are calculated relative to the crop box of the stamp). Or, preprocess the stamp with \texttt{-shift} first.
|
\noindent The position commands in \Sref{position} can be used to locate the stamp more precisely (they are calculated relative to the crop box of the stamp). Or, preprocess the stamp with \texttt{-shift} first.
|
||||||
|
|
||||||
|
The \texttt{-scale-to-fit-stamp} option can be added to scale the stamp to fit the page before applying it. The use of positioning commands together with \texttt{-scale-stamp-to-fit} is not recommended.
|
||||||
|
|
||||||
The \texttt{-combine-pages} operation takes two PDF files and stamps each
|
The \texttt{-combine-pages} operation takes two PDF files and stamps each
|
||||||
page of one over each page of the other. The length of the output is the same
|
page of one over each page of the other. The length of the output is the same
|
||||||
as the length of the ``under'' file. For instance:
|
as the length of the ``under'' file. For instance:
|
||||||
|
@ -1268,7 +1274,7 @@ The starting point can be set with the \texttt{-bates} option. For example:
|
||||||
\small\verb!-bottomright 10! & Right of baseline 10 pts up and in from bottom right \\
|
\small\verb!-bottomright 10! & Right of baseline 10 pts up and in from bottom right \\
|
||||||
\small\verb!-right 10! & Right of baseline 10 pts in from the center right \\
|
\small\verb!-right 10! & Right of baseline 10 pts in from the center right \\
|
||||||
\small\verb!-diagonal! & Diagonal, bottom left to top right, centered on page\\
|
\small\verb!-diagonal! & Diagonal, bottom left to top right, centered on page\\
|
||||||
\small\verb!-reverse-diagonal! & Diagonal, bottom right to top left, centered on page\\
|
\small\verb!-reverse-diagonal! & Diagonal, top left to bottom right, centered on page\\
|
||||||
\small\verb!-center! & Centered on page\\
|
\small\verb!-center! & Centered on page\\
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
\end{framed}
|
\end{framed}
|
||||||
|
@ -1567,6 +1573,10 @@ given page range.
|
||||||
\noindent\verb! -center-window!\\
|
\noindent\verb! -center-window!\\
|
||||||
\noindent\verb! -display-doc-title!
|
\noindent\verb! -display-doc-title!
|
||||||
|
|
||||||
|
\vspace{1.5mm}
|
||||||
|
\small\noindent\verb!cpdf -open-at-page <page number> in.pdf -o out.pdf!\\
|
||||||
|
\noindent\verb!cpdf -open-at-page-fit <page number> in.pdf -o out.pdf!
|
||||||
|
|
||||||
\vspace{1.5mm}
|
\vspace{1.5mm}
|
||||||
\small\noindent\verb!cpdf -set-metadata <metadata-file> in.pdf -o out.pdf!
|
\small\noindent\verb!cpdf -set-metadata <metadata-file> in.pdf -o out.pdf!
|
||||||
|
|
||||||
|
@ -1645,13 +1655,14 @@ Appendix~\ref{dates}.
|
||||||
By default, cpdf strips to ASCII, discarding character codes in excess of 127. In order to preserve the original unicode, add the \texttt{-utf8} option. To disable all postprocessing of the string, add \texttt{-raw}.
|
By default, cpdf strips to ASCII, discarding character codes in excess of 127. In order to preserve the original unicode, add the \texttt{-utf8} option. To disable all postprocessing of the string, add \texttt{-raw}.
|
||||||
|
|
||||||
\vspace{4mm}
|
\vspace{4mm}
|
||||||
The \texttt{-page-info} option prints the media box and other boxes
|
The \texttt{-page-info} option prints the page label, media box and other boxes
|
||||||
page-by-page to standard output:
|
page-by-page to standard output, for all pages in the current range.
|
||||||
|
|
||||||
\begin{framed}
|
\begin{framed}
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
$cpdf -page-info 14psfonts.pdf
|
$cpdf -page-info 14psfonts.pdf
|
||||||
Page 1:
|
Page 1:
|
||||||
|
Label: i
|
||||||
MediaBox: 0.000000 0.000000 600.000000 450.000000
|
MediaBox: 0.000000 0.000000 600.000000 450.000000
|
||||||
CropBox: 200.000000 200.000000 500.000000 500.000000
|
CropBox: 200.000000 200.000000 500.000000 500.000000
|
||||||
BleedBox:
|
BleedBox:
|
||||||
|
@ -1707,7 +1718,7 @@ at which the command is executed.)
|
||||||
\small\verb!cpdf -set-title "A Night in London" in.pdf -o out.pdf!
|
\small\verb!cpdf -set-title "A Night in London" in.pdf -o out.pdf!
|
||||||
\end{framed}
|
\end{framed}
|
||||||
\noindent The text string is considered to be in UTF8 format, unless the \texttt{-raw}
|
\noindent The text string is considered to be in UTF8 format, unless the \texttt{-raw}
|
||||||
option is added---in which case, it is unprocessed.
|
option is added---in which case, it is unprocessed, save for the replacement of any octal escape sequence such as \texttt{\textbackslash 017}, which is replaced by a character of its value (here, 15).
|
||||||
|
|
||||||
\section{Upon Opening a Document}
|
\section{Upon Opening a Document}
|
||||||
|
|
||||||
|
@ -1768,6 +1779,16 @@ document when first opened. The possible (case-sensitive) values are:
|
||||||
\small\verb!cpdf -hide-toolbar true in.pdf -o out.pdf!
|
\small\verb!cpdf -hide-toolbar true in.pdf -o out.pdf!
|
||||||
\end{framed}
|
\end{framed}
|
||||||
|
|
||||||
|
The page a PDF file opens at can be set using \texttt{-open-at-page}:
|
||||||
|
\begin{framed}
|
||||||
|
\small\verb!cpdf -open-at-page 15 in.pdf -o out.pdf!
|
||||||
|
\end{framed}
|
||||||
|
|
||||||
|
To have that page scaled to fit the window in the viewer, use \texttt{-open-at-page-fit} instead:
|
||||||
|
\begin{framed}
|
||||||
|
\small\verb!cpdf -open-at-page-fit 15 in.pdf -o out.pdf!
|
||||||
|
\end{framed}
|
||||||
|
|
||||||
\section{Metadata}
|
\section{Metadata}
|
||||||
\index{metadata}
|
\index{metadata}
|
||||||
PDF files can contain a piece of arbitrary metadata, often in XML format.
|
PDF files can contain a piece of arbitrary metadata, often in XML format.
|
||||||
|
|
Loading…
Reference in New Issue