This commit is contained in:
John Whitington 2022-01-08 14:26:54 +00:00
parent 01c08ee5d8
commit 3304b54438
4 changed files with 15 additions and 4 deletions

View File

@ -9,7 +9,7 @@ o New operations -impose and -impose-xy for document imposition
o New operation -print-font-table gives (charcode, unicode, glyph name) triples
o New -print-dict-entry operation prints values for a given key
o New -replace-dict-entry function to search & replace e.g URLs
o Append e.g DUP2 to a page range to make 1,2,3 --> 1,1,2,2,3,3 etc.
o Prepend e.g 2DUP to a page range to make 1,2,3 --> 1,1,2,2,3,3 etc.
o Prepend NOT to a page range to invert it
o Output annotations in JSON form with -list-annotations-json
o Output bookmarks in JSON format with -list-bookmarks-json

View File

@ -924,7 +924,7 @@ let setmethod s =
if args.op = None then args.op <- Some Encrypt; (* Could be additional to -split *)
match s with
| "40bit" | "128bit" | "AES" | "AES256" | "AES256ISO" -> args.crypt_method <- s
| _ -> error "Unsupported encryption method"
| _ -> error ("Unsupported encryption method " ^ s)
let setowner s =
args.owner <- s

Binary file not shown.

View File

@ -810,9 +810,9 @@ If the malformity lies inside an individual page of the PDF, rather than in its
\noindent The command line for \texttt{-gs-malformed-force} must be of \textit{precisely} this form. Sometimes, on the other hand, we might wish \texttt{cpdf} to fail immediately on any malformed file, rather than try its own reconstruction process. The option \texttt{-error-on-malformed} achieves this.
Sometimes files can be technically well-formed but use inefficient PDF
Sometimes (old, pre-ISO standardisation) files can be technically well-formed but use inefficient PDF
constructs. If you are sure the input files you are using are
impeccably formed, the \texttt{-fast} option may be added to the command line (or, if
well formed, the \texttt{-fast} option may be added to the command line (or, if
using \texttt{AND}, to each section of the command line). This will use certain
shortcuts which speed up processing, but would fail on badly-produced files. The \verb!-fast! option may be used with:
@ -1103,6 +1103,9 @@ The encryption parameters described in Chapter \ref{encryption} may be added to
\vspace{1.5mm}
\small\noindent\verb!cpdf -rotateby <angle> in.pdf [<range>] -o out.pdf!
\vspace{1.5mm}
\small\noindent\verb!cpdf -upright [-fast] in.pdf [<range>] -o out.pdf!
\vspace{1.5mm}
\small\noindent\verb!cpdf -rotate-contents <angle> [-fast] in.pdf [<range>] -o out.pdf!
@ -1282,6 +1285,14 @@ ninety degrees clockwise. Does not change the page dimensions.
\texttt{-rotate} and \texttt{-rotate-contents} is required to change the
rotation of the document to zero without altering its appearance. In addition, it makes sure the media box has its origin at (0,0), changing other boxes to compensate. This is important because some operations in CPDF (such as scale-to-fit), and in other PDF-processing programs, work properly only when the origin is (0, 0).
\begin{framed}
\small\verb!cpdf -upright in.pdf -o out.pdf!
\vspace{2.5mm}
\noindent Make pages upright.
\end{framed}
\section{Flipping Pages}
\index{flip pages}
The \texttt{-hflip} and \texttt{-vflip} operations flip the contents of the