First working roundtrip structure tree
This commit is contained in:
parent
17762e35a0
commit
02e220ec1a
|
@ -1,9 +1,6 @@
|
|||
(** Two exceptions recommended for use with the library, though currently not
|
||||
raised by any function in this module. Cpdfcommand uses them extensively. *)
|
||||
(** Two exceptions recommended for use with the library. *)
|
||||
exception SoftError of string
|
||||
|
||||
exception HardError of string
|
||||
|
||||
let error s = raise (SoftError s)
|
||||
|
||||
|
||||
|
|
|
@ -363,7 +363,7 @@ let replace_struct_tree pdf (json : Cpdfyojson.Safe.t) =
|
|||
| Pdf.Indirect i ->
|
||||
begin match lookup i negobjnummap with
|
||||
| Some x -> Pdf.Indirect x
|
||||
| None -> error "rewrite_indirects"
|
||||
| None -> Pdf.Indirect i
|
||||
end
|
||||
| Pdf.Dictionary d -> Pdf.recurse_dict (rewrite_indirects negobjnummap) d
|
||||
| Pdf.Array a -> Pdf.recurse_array (rewrite_indirects negobjnummap) a
|
||||
|
|
Loading…
Reference in New Issue