This commit is contained in:
John Whitington
2023-04-21 16:22:57 +01:00
parent d596c381d4
commit b124c8362d
3 changed files with 14 additions and 8 deletions

View File

@ -573,7 +573,7 @@ let of_input i =
| Some ch ->
pdf_of_json (J.from_channel ch)
| None ->
let content = Pdfio.string_of_bytes (Pdfio.bytes_of_input i 0 i.Pdfio.in_channel_length) in
let content = Pdfio.string_of_input i in
pdf_of_json (J.from_string content)
with
e -> error (Printexc.to_string e)