more manual fixes w.r.t recrypt
This commit is contained in:
parent
b8fed7ea3f
commit
3062236c11
2
Changes
2
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
|
||||
|
||||
|
|
Binary file not shown.
|
@ -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 =
|
||||
|
|
BIN
cpdfmanual.pdf
BIN
cpdfmanual.pdf
Binary file not shown.
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue