Auto-tagging for special text
This commit is contained in:
parent
bd1300b204
commit
5f294bf283
|
@ -453,7 +453,11 @@ let rec ops_of_drawop struct_tree dryrun pdf endpage filename bates batespad num
|
||||||
| SpecialText s ->
|
| SpecialText s ->
|
||||||
let s = process_specials pdf endpage filename bates batespad num page s in
|
let s = process_specials pdf endpage filename bates batespad num page s in
|
||||||
if dryrun then iter (fun c -> Hashtbl.replace (res ()).current_fontpack_codepoints c ()) (Pdftext.codepoints_of_utf8 s);
|
if dryrun then iter (fun c -> Hashtbl.replace (res ()).current_fontpack_codepoints c ()) (Pdftext.codepoints_of_utf8 s);
|
||||||
fst (runs_of_utf8 s)
|
let m = if !do_auto_tag then mcid () else 0 in
|
||||||
|
if not dryrun && !do_auto_tag then structdata := StDataMCID ("/P", m)::!structdata;
|
||||||
|
(if struct_tree && !do_auto_tag then [Pdfops.Op_BDC ("/P", Pdf.Dictionary ["/MCID", Pdf.Integer m])] else [])
|
||||||
|
@ fst (runs_of_utf8 s)
|
||||||
|
@ (if struct_tree && !do_auto_tag then [Pdfops.Op_EMC] else [])
|
||||||
| Para (indent, j, w, s) ->
|
| Para (indent, j, w, s) ->
|
||||||
if dryrun then iter (iter (fun c -> Hashtbl.replace (res ()).current_fontpack_codepoints c ())) (map Pdftext.codepoints_of_utf8 s);
|
if dryrun then iter (iter (fun c -> Hashtbl.replace (res ()).current_fontpack_codepoints c ())) (map Pdftext.codepoints_of_utf8 s);
|
||||||
let first = ref true in
|
let first = ref true in
|
||||||
|
|
Loading…
Reference in New Issue