This commit is contained in:
John Whitington 2023-01-16 14:37:59 +08:00
parent 7a8a1267e4
commit d5c0af5ebf
2 changed files with 2 additions and 2 deletions

View File

@ -194,7 +194,7 @@ let rec op_of_json = function
Printf.eprintf "Unable to read op from %s\n" (J.show j); Printf.eprintf "Unable to read op from %s\n" (J.show j);
error "op reading failed" error "op reading failed"
and object_of_json = function and object_of_json ?(utf8=false) = function
| `Null -> P.Null | `Null -> P.Null
| `Bool b -> P.Boolean b | `Bool b -> P.Boolean b
| `Int n -> Pdf.Indirect n | `Int n -> Pdf.Indirect n

View File

@ -16,4 +16,4 @@ val of_input : Pdfio.input -> Pdf.t
val json_of_object : ?utf8:bool -> ?clean_strings:bool -> Pdf.t -> (int -> unit) -> no_stream_data:bool -> parse_content:bool -> Pdf.pdfobject -> Cpdfyojson.Safe.t val json_of_object : ?utf8:bool -> ?clean_strings:bool -> Pdf.t -> (int -> unit) -> no_stream_data:bool -> parse_content:bool -> Pdf.pdfobject -> Cpdfyojson.Safe.t
(** Convert a single CPDFJSON object to a PDF object *) (** Convert a single CPDFJSON object to a PDF object *)
val object_of_json : Cpdfyojson.Safe.t -> Pdf.pdfobject val object_of_json : ?utf8:bool -> Cpdfyojson.Safe.t -> Pdf.pdfobject