fixes from manual testing

This commit is contained in:
John Whitington 2014-11-17 18:48:17 +00:00
parent 29f663e85b
commit 1d158ffaeb
3 changed files with 11 additions and 12 deletions

View File

@ -1,9 +1,9 @@
(* cpdf command line tools *) (* cpdf command line tools *)
let demo = false let demo = false
let noncomp = false let noncomp = false
let major_version = 1 let major_version = 2
let minor_version = 8 let minor_version = 1
let version_date = "(unreleased, 28th October 2014)" let version_date = "(RC1, 17th November 2014)"
open Pdfutil open Pdfutil
open Pdfio open Pdfio
@ -1300,7 +1300,7 @@ let setstdinuser u =
let setstdinowner o = let setstdinowner o =
match args.inputs with match args.inputs with
| (StdIn, x, y, u, _, f)::t -> args.inputs <- (StdIn, x, y, u, o, f)::t | (StdIn, x, y, u, _, f)::t -> args.inputs <- (StdIn, x, y, u, o, f)::t
| _ -> error "-stdin-user: must follow -stdin" | _ -> error "-stdin-owner: must follow -stdin"
let setopenatpage n = let setopenatpage n =
args.op <- Some (OpenAtPage n) args.op <- Some (OpenAtPage n)

Binary file not shown.

View File

@ -170,7 +170,7 @@ at least five pages.
\end{framed} \end{framed}
\index{decryption} \index{decryption}
\section{Decryption} \section{Working with Encrypted Documents}
\index{owner password} \index{owner password}
\index{user password} \index{user password}
\index{password} \index{password}
@ -182,7 +182,8 @@ after any range). The document will \textit{not} be re-encrypted upon writing.
example: example:
\begin{framed} \begin{framed}
\small\verb!cpdf in.pdf user=fred reverse -o out.pdf! \noindent\small\verb!cpdf in.pdf user=charles -info!\\
\noindent\small\verb!cpdf in.pdf owner=fred reverse -o out.pdf!
\end{framed} \end{framed}
\noindent To re-encrypt the file with its existing encryption upon writing, which is required if only the user password was supplied, but allowed in any case, add the \texttt{-recrypt} option: \noindent To re-encrypt the file with its existing encryption upon writing, which is required if only the user password was supplied, but allowed in any case, add the \texttt{-recrypt} option:
@ -242,7 +243,7 @@ one. The advantage compared with using pipes is that the file need not be
repeatedly parsed and written out, saving time. repeatedly parsed and written out, saving time.
To use \texttt{AND}, simply leave off the output specifier (e.g \texttt{-o}) of To use \texttt{AND}, simply leave off the output specifier (e.g \texttt{-o}) of
one command, and the input specifier (e.g filename). For instance: one command, and the input specifier (e.g filename) of the next. For instance:
\begin{framed} \begin{framed}
\small\verb!cpdf -merge in.pdf in2.pdf AND -add-text "Label"! \small\verb!cpdf -merge in.pdf in2.pdf AND -add-text "Label"!
@ -367,13 +368,11 @@ PDF 1.5 introduced a new mechanism for storing objects to save space: object str
\noindent Files written with object streams will be set to PDF 1.5 or higher, unless \texttt{-keep-version} is used (see above). \noindent Files written with object streams will be set to PDF 1.5 or higher, unless \texttt{-keep-version} is used (see above).
Object streams are always removed prior to linearization.
\section{Malformed Files} \section{Malformed Files}
There are many malformed PDF files in existence, including many produced by There are many malformed PDF files in existence, including many produced by
otherwise-reputable applications. \cpdf\ attempts to correct these problems otherwise-reputable applications. \cpdf\ attempts to correct these problems
silently, but sometimes this can be very slow. silently.
Grossly malformed files will be reconstructed. The reconstruction Grossly malformed files will be reconstructed. The reconstruction
progress is shown on \verb!stderr! (Standard Error): progress is shown on \verb!stderr! (Standard Error):
@ -395,11 +394,11 @@ shortcuts which speed up processing, but would fail on badly-produced files.
The \verb!-fast! option may be used with: The \verb!-fast! option may be used with:
\begin{framed} \begin{framed}
\small\noindent Section \ref{pages}\\ \small\noindent Chapter \ref{pages}\\
\noindent\small\verb!-rotate-contents -upright -vflip -hflip!\\ \noindent\small\verb!-rotate-contents -upright -vflip -hflip!\\
\small\verb!-shift -scale -scale-to-fit -scale-contents!\\ \small\verb!-shift -scale -scale-to-fit -scale-contents!\\
\noindent Section \ref{stamps}\\ \noindent Chapter \ref{stamps}\\
\noindent\small\verb!-add-text!\\ \noindent\small\verb!-add-text!\\
\small\verb!-stamp-on -stamp-under -combine-pages! \small\verb!-stamp-on -stamp-under -combine-pages!
\end{framed} \end{framed}