From 3062236c11885b78b36444b19c68f8b675bc1c7f Mon Sep 17 00:00:00 2001 From: John Whitington Date: Tue, 18 Nov 2014 14:57:18 +0000 Subject: [PATCH] more manual fixes w.r.t recrypt --- Changes | 2 +- blankowneruser.pdf | Bin 1179 -> 1447 bytes cpdfcommand.ml | 6 ++++++ cpdfmanual.pdf | Bin 216082 -> 216152 bytes cpdfmanual.tex | 4 ++-- 5 files changed, 9 insertions(+), 3 deletions(-) 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 1bffc0390f7a94289182fd0bc4387b235d9dae61..e14b71419e385ca14a5c103697bb6bebadcf9bee 100644 GIT binary patch delta 751 zcmbQuxt!ZlHNeG9*HF)lOSPe~shP`A!9XEDDT_-(D3?V=a`*cO3%u8)6XdU5V6_1v_W5_?Uq)Vvgs z&1Ntch|GC!8Kb#Nrch;5pP%82nX^)UZht=6t5>{cUeF`wn4+0SCZ{tluP-{_`FY=q zl5-~t)NSr;o1ANsqk_^|f)VvaXm;7Y^g48^qLSKDH*WfTCJ0Q?^%}Xw-EGY3!ElEsCEJ;)- zDJo6XhiNym&<|2D(f8NjUfdkt@sqjZxnD?xqv|;k?FaW%j%~PH?)IQ`$HdaKLI+L# zPz}pFFP>(xCI3|}Elt_1zic)G8qm}aP|!62y0OR&;!q%&3uR7rWAWy)FtOxPRdw}u G;{pKNdju8$ delta 482 zcmZ3^J)2WOHNeG9*HF)xOSPe~shP`A!9XEDDT_79Imak)>>go%$WSzEi>Iz#wb z;sd-Mw0`xR|D0KCY@X&ixY9EtVwj=*YME!}$ zznLc1n*f!8fI^-E7nosSU}$cPA!cNXsm|EQ1Vf#%sR5>#nFWTJiGdMV%p2Ka6C+H` zriQ=(Ky#oe76Z);4JU`O*oGMD2Pqio`)f>j5mVwKnWk0l;`Ezc&vw4#%ZmnYVoH`= zV3Vu(H;KP$o4%%gsK)GP2h}EcS<9NN=&hOcyg}zdz`5JUil%Js{lNUC@QkyMrhb5e VuF2#eR&Opd3kxn)RabvEE&!tKj?e%A 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 c7c2fc9bb6e6f5fa7987ff79ced3811bdd291329..b14fac1119611f7ac54c767040dd77ac60672ea9 100644 GIT binary patch delta 4122 zcmV+#5asWZm<`yN4S=)(h)x1HG?StKDSy>gOLN;e48HqU@F>qjEFa+O+O(NzFWcSq zrPKD{%5tKeSaK~X+5GzjMM{<}+tbv&?1>Nw0w6x%gWfJ?Z|)2bN1Ya$EY`#-%A_M& z7%G_|ixv5ja78tpr%JQr_K#1W=c!OE`S5Q3ZSnEV9bVht1|}#NM_9P1l-HTPUw_Pg z%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