mirror of
https://github.com/johnwhitington/cpdf-source.git
synced 2025-04-15 10:48:00 +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 ->
|
(fun u ->
|
||||||
match charcode_extractor u with
|
match charcode_extractor u with
|
||||||
| Some x -> Hashtbl.add table u (i, x)
|
| 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)
|
subset)
|
||||||
indexes fs;
|
indexes fs;
|
||||||
table
|
table
|
||||||
|
@ -138,6 +138,9 @@ let add_to_parent_tree pdf p =
|
|||||||
begin match lookup "/ParentTree" d with
|
begin match lookup "/ParentTree" d with
|
||||||
| Some (Pdf.Indirect i) ->
|
| Some (Pdf.Indirect i) ->
|
||||||
Pdf.addobj_given_num pdf (i, newtree)
|
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
|
end
|
||||||
| _ -> ()
|
| _ -> ()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user