mirror of
https://github.com/johnwhitington/cpdf-source.git
synced 2025-04-13 18:02:20 +02:00
All TOC PDF/UA examples now work
This commit is contained in:
parent
b4514e3418
commit
502f51b671
@ -83,7 +83,7 @@ let make_fontpack_hashtable fs =
|
||||
(fun u ->
|
||||
match charcode_extractor u with
|
||||
| Some x -> Hashtbl.add table u (i, x)
|
||||
| None -> Printf.printf "charcode_extractor could not find char in make_fontpack_hashtable\n")
|
||||
| None -> Printf.printf "charcode_extractor could not find char U+%04x in make_fontpack_hashtable\n" u)
|
||||
subset)
|
||||
indexes fs;
|
||||
table
|
||||
|
@ -138,6 +138,9 @@ let add_to_parent_tree pdf p =
|
||||
begin match lookup "/ParentTree" d with
|
||||
| Some (Pdf.Indirect i) ->
|
||||
Pdf.addobj_given_num pdf (i, newtree)
|
||||
| Some (Pdf.Dictionary d) ->
|
||||
let i = Pdf.addobj pdf newtree in
|
||||
Pdf.replace_chain pdf ["/Root"; "/StructTreeRoot"; "/ParentTree"] (Pdf.Indirect i)
|
||||
| _ -> ()
|
||||
end
|
||||
| _ -> ()
|
||||
|
Loading…
x
Reference in New Issue
Block a user