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) ->