From ee917c8c7d5634d53e2bedf426a00d0fcea0bf15 Mon Sep 17 00:00:00 2001 From: John Whitington Date: Tue, 17 Sep 2024 14:03:34 +0100 Subject: [PATCH] Fix -no-auto-artifact behaviour --- cpdfdraw.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpdfdraw.ml b/cpdfdraw.ml index 0feacd3..1696d68 100644 --- a/cpdfdraw.ml +++ b/cpdfdraw.ml @@ -1,7 +1,7 @@ open Pdfutil open Cpdferror -let do_add_artifacts = ref false +let do_add_artifacts = ref true let do_auto_tag = ref true @@ -648,7 +648,7 @@ let write_structure_tree pdf st = let draw ~struct_tree ~fast ~underneath ~filename ~bates ~batespad range pdf drawops = (*Printf.printf "%s\n" (string_of_drawops drawops);*) - do_add_artifacts := struct_tree; + if not struct_tree then clear do_add_artifacts; resstack := [empty_res ()]; Hashtbl.clear !fontpacks; (res ()).time <- Cpdfstrftime.current_time ();