Remove old hack

This commit is contained in:
John Whitington 2023-04-12 19:20:47 +01:00
parent 0b3ca7ef7b
commit 67ec6268af
1 changed files with 1 additions and 5 deletions

View File

@ -1525,9 +1525,6 @@ let setrelativetocropbox () =
let setprerotate () = let setprerotate () =
args.prerotate <- true args.prerotate <- true
let setflatkids () =
Pdfpage.flat_pagetrees := true
let settopage s = let settopage s =
args.topage <- Some s args.topage <- Some s
@ -2872,7 +2869,6 @@ and specs =
("-remove-unused-resources", Arg.Unit (setop RemoveUnusedResources), ""); ("-remove-unused-resources", Arg.Unit (setop RemoveUnusedResources), "");
("-stay-on-error", Arg.Unit setstayonerror, ""); ("-stay-on-error", Arg.Unit setstayonerror, "");
("-extract-fontfile", Arg.Unit (setop ExtractFontFile), ""); ("-extract-fontfile", Arg.Unit (setop ExtractFontFile), "");
("-flat-kids", Arg.Unit setflatkids, "");
("-debug", Arg.Unit setdebug, ""); ("-debug", Arg.Unit setdebug, "");
("-debug-crypt", Arg.Unit setdebugcrypt, ""); ("-debug-crypt", Arg.Unit setdebugcrypt, "");
("-debug-force", Arg.Unit setdebugforce, ""); ("-debug-force", Arg.Unit setdebugforce, "");
@ -3532,7 +3528,7 @@ let go () =
(* FIXME Here, if the output file is different from the (* FIXME Here, if the output file is different from the
input file, and we're just extracting pages, might we use a input file, and we're just extracting pages, might we use a
lazy read? *) lazy read? *)
if hd ranges <> "all" || !Pdfpage.flat_pagetrees then if hd ranges <> "all" then
let range = parse_pagespec pdf (hd ranges) in let range = parse_pagespec pdf (hd ranges) in
let newpdf = Pdfpage.pdf_of_pages ~retain_numbering:args.retain_numbering pdf range in let newpdf = Pdfpage.pdf_of_pages ~retain_numbering:args.retain_numbering pdf range in
write_pdf false newpdf write_pdf false newpdf