This commit is contained in:
John Whitington 2023-05-03 13:53:48 +01:00
parent 829edb6460
commit f192a99a35
2 changed files with 6 additions and 3 deletions

View File

@ -4468,7 +4468,9 @@ let go () =
if !tdeep <> 0 then error "Unmatched -bt / -et" else
let pdf = get_single_pdf args.op false in
let range = parse_pagespec_allow_empty pdf (get_pagespec ()) in
write_pdf false (Cpdfdraw.draw ~filename:args.original_filename ~bates:args.bates ~batespad:args.batespad args.fast range pdf (rev (Hashtbl.find drawops "_")))
write_pdf
false
(Cpdfdraw.draw ~filename:args.original_filename ~bates:args.bates ~batespad:args.batespad args.fast range pdf (rev (Hashtbl.find drawops "_")))
| Some (Composition json) ->
let pdf = get_single_pdf args.op false in
let filesize =
@ -4574,7 +4576,8 @@ let go_withargv argv =
args.inputs <- rev (map addrange !output_pdfs) @ rev args.inputs;
output_pdfs := [];
go ();
Hashtbl.clear drawops
Hashtbl.clear drawops;
Hashtbl.add drawops "_" []
)
sets;
flush stdout; (*r for Windows *)

View File

@ -189,7 +189,7 @@ let draw_single ~filename ~bates ~batespad fast range pdf drawops =
let pdf = ref pdf in
iter2
(fun n s ->
if mem n range then (Printf.printf "Adding ops to page %i\n" n; pdf := Cpdftweak.append_page_content s false fast [n] !pdf))
if mem n range then pdf := Cpdftweak.append_page_content s false fast [n] !pdf)
(ilist 1 endpage)
ss;
let pdf = !pdf in