From 77e33792b48006446f6ca03720e8d06125c9ce38 Mon Sep 17 00:00:00 2001 From: John Whitington Date: Fri, 20 Sep 2024 17:22:12 +0100 Subject: [PATCH] Account for CamlPDF comment changes --- cpdfcommand.ml | 3 ++- cpdfjson.ml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cpdfcommand.ml b/cpdfcommand.ml index da42d19..8606a12 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -1899,7 +1899,8 @@ let expand_namespace = function let setreadableops () = Pdfops.whitespace := "\n"; - Pdfops.always_add_whitespace := true + Pdfops.always_add_whitespace := true; + Pdfops.write_comments := true let specs = [("-version", diff --git a/cpdfjson.ml b/cpdfjson.ml index 1ad16a0..3b7530a 100644 --- a/cpdfjson.ml +++ b/cpdfjson.ml @@ -448,6 +448,7 @@ let json_of_op utf8 pdf no_stream_data = function | O.Op_MP s -> `List [`String s; `String "MP"] | O.Op_BMC s -> `List [`String s; `String "BMC"] | O.Op_Unknown s -> `List [`String s; `String "Unknown"] + | O.Op_Comment s -> `List [`String s; `String "Comment"] | O.Op_SCNName (s, fs) -> `List (map (fun x -> mkfloat x) fs @ [`String s; `String "SCNName"]) | O.Op_scnName (s, fs) ->