This commit is contained in:
John Whitington 2025-03-11 16:58:51 +00:00
parent 803a72ba9d
commit c47d1a15ff
2 changed files with 4 additions and 5 deletions

View File

@ -1,4 +1,4 @@
%Document -process-struct-tree with -stamp-on, -stamp-under, -combine-pages, new combine pages stuff (over is principal, length changes) %Document -process-struct-tree with -stamp-on, -stamp-under, -combine-pages, new combine pages stuff (over is principal, scale stamp to fit)
%Document -mark-as-artifact %Document -mark-as-artifact
%\DocumentMetadata{lang=en, pdfversion=2.0, pdfstandard=ua-2, pdfstandard=a-4f, testphase={phase-III, title, table, math, firstaid}} %\DocumentMetadata{lang=en, pdfversion=2.0, pdfstandard=ua-2, pdfstandard=a-4f, testphase={phase-III, title, table, math, firstaid}}
\documentclass{book} \documentclass{book}

View File

@ -889,7 +889,7 @@ let stamp ~process_struct_tree relative_to_cropbox position topline midline fast
let new_marks = map (Cpdfbookmarks.change_bookmark changetable) marks in let new_marks = map (Cpdfbookmarks.change_bookmark changetable) marks in
Pdfmarks.add_bookmarks new_marks changed Pdfmarks.add_bookmarks new_marks changed
(* Combine pages from two PDFs. For now, assume equal length. FIXME: Why? *) (* Combine pages from two PDFs. *)
(* If [over] has more pages than [under], chop the excess. If the converse, pad (* If [over] has more pages than [under], chop the excess. If the converse, pad
[over] to the same length *) [over] to the same length *)
@ -915,8 +915,7 @@ let equalize_pages under over =
else else
under, over under, over
let combine_pages ~process_struct_tree fast under over scaletofit swap = let combine_pages ~process_struct_tree fast under over scaletofit over_is_under =
let over, under = if swap then under, over else over, under in
let over = if process_struct_tree then mark_all_as_artifact (remove_struct_tree over) else over in let over = if process_struct_tree then mark_all_as_artifact (remove_struct_tree over) else over in
let debug_combine_pages = false in let debug_combine_pages = false in
let debug_pdf pdf n = let debug_pdf pdf n =
@ -944,7 +943,7 @@ let combine_pages ~process_struct_tree fast under over scaletofit swap =
map2 map2
(fun o u -> (fun o u ->
do_stamp do_stamp
false fast (BottomLeft (0., 0.)) false false scaletofit (not swap) merged o u over) false fast (BottomLeft (0., 0.)) false false scaletofit (not over_is_under) merged o u over)
over_pages under_pages over_pages under_pages
in in
(* Build the changes. 123456 -> 123123 *) (* Build the changes. 123456 -> 123123 *)