diff --git a/Changes b/Changes index c3a69ca..43f5151 100644 --- a/Changes +++ b/Changes @@ -11,7 +11,7 @@ o New -center position for text o -stamp can now use positions, just like stamping text o Better handling of permissions for files with user passwords o Linearization excised -o Can encrypt output of -split-bookmarks now +o Can encrypt or recrypt output of -split and -split-bookmarks now o -args replaces -control with better behaviour o Can scale a stamp to fit before stamping with -scale-stamp-to-fit diff --git a/blankowneruser.pdf b/blankowneruser.pdf index 1bffc03..e14b714 100644 Binary files a/blankowneruser.pdf and b/blankowneruser.pdf differ diff --git a/cpdfcommand.ml b/cpdfcommand.ml index dbd7613..af6c29f 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -3253,6 +3253,8 @@ let go () = pdf.Pdf.minor <- if args.keepversion then pdf.Pdf.minor else max pdf.Pdf.minor 1; write_pdf false pdf' | Some ChangeId -> + if args.recrypt then + soft_error "Cannot recrypt with change id: an id is part of encryption information"; begin match args.inputs, args.out with | [(k, _, _, _, _, _) as input], File s -> let pdf = get_pdf_from_input_kind input args.op k in @@ -3263,10 +3265,14 @@ let go () = | _ -> error "ChangeId: exactly one input file and output file required." end | Some RemoveId -> + if args.recrypt then + soft_error "Cannot recrypt with remove id: an id is part of encryption information"; let pdf = get_single_pdf args.op false in pdf.Pdf.trailerdict <- Pdf.remove_dict_entry pdf.Pdf.trailerdict "/ID"; write_pdf false pdf | Some (CopyId getfrom) -> + if args.recrypt then + soft_error "Cannot recrypt with copy id: an id is part of encryption information" begin match args.inputs with | [(k, _, _, u, o, _) as input] -> let pdf = diff --git a/cpdfmanual.pdf b/cpdfmanual.pdf index c7c2fc9..b14fac1 100644 Binary files a/cpdfmanual.pdf and b/cpdfmanual.pdf differ diff --git a/cpdfmanual.tex b/cpdfmanual.tex index 172ac15..18e1598 100644 --- a/cpdfmanual.tex +++ b/cpdfmanual.tex @@ -2140,7 +2140,7 @@ input, writing to the output. \vspace{2.5mm} \noindent Copy the id from \texttt{source.pdf} to the contents of \texttt{in.pdf}, writing to \texttt{out.pdf}. \end{framed} - \noindent If there is no ID in the source file, the existing ID is retained. + \noindent If there is no ID in the source file, the existing ID is retained. You cannot use \texttt{-recrypt} with \texttt{-copy-id-from}. \section{Remove ID} \index{remove ID} @@ -2152,7 +2152,7 @@ input, writing to the output. \noindent Remove the ID from \texttt{in.pdf}, writing to \texttt{out.pdf}. \end{framed} -Note that \texttt{-recrypt} will add an ID, since one is required for encrypted PDFs. +You cannot use \texttt{-recrypt} with \texttt{-remove-id}. \appendix \chapter{Dates}