diff --git a/Changes b/Changes index 070ec03..8dba967 100644 --- a/Changes +++ b/Changes @@ -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 diff --git a/cpdfcommand.ml b/cpdfcommand.ml index ccebf63..5e42c13 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -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 diff --git a/cpdfmanual.pdf b/cpdfmanual.pdf index 71a62f4..e2f78df 100644 Binary files a/cpdfmanual.pdf and b/cpdfmanual.pdf differ diff --git a/cpdfmanual.tex b/cpdfmanual.tex index 341dd5c..6537ce2 100644 --- a/cpdfmanual.tex +++ b/cpdfmanual.tex @@ -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 in.pdf [] -o out.pdf! + \vspace{1.5mm} + \small\noindent\verb!cpdf -upright [-fast] in.pdf [] -o out.pdf! + \vspace{1.5mm} \small\noindent\verb!cpdf -rotate-contents [-fast] in.pdf [] -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