From 4d87a90bdf53aa2268b91aea282100a3485bdd92 Mon Sep 17 00:00:00 2001 From: John Whitington Date: Fri, 14 Jan 2022 15:21:54 +0000 Subject: [PATCH] more --- cpdfjson.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpdfjson.ml b/cpdfjson.ml index a9e2e21..d1f366b 100644 --- a/cpdfjson.ml +++ b/cpdfjson.ml @@ -476,7 +476,9 @@ let json_of_pdf if clean_strings then preprocess_strings pdf; let pdf = if parse_content then precombine_page_content pdf else pdf in if decompress_streams then - Pdf.objiter (fun _ obj -> Pdfcodec.decode_pdfstream_until_unknown pdf obj) pdf; + Pdf.objiter + (fun _ obj -> match obj with Pdf.Stream _ -> Pdfcodec.decode_pdfstream_until_unknown pdf obj | _ -> ()) + pdf; Pdf.remove_unreferenced pdf; let trailerdict = (0, json_of_object pdf (fun x -> ()) no_stream_data false pdf.P.trailerdict) in let parameters =