diff --git a/cpdfcommand.ml b/cpdfcommand.ml index e37af8c..ba0a4e1 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -2,8 +2,8 @@ let demo = false let noncomp = false let major_version = 2 -let minor_version = 6 -let version_date = "(24th July 2023)" +let minor_version = 7 +let version_date = "(devel, 21st August 2023)" open Pdfutil open Pdfio diff --git a/cpdfcomposition.ml b/cpdfcomposition.ml index 77859ea..7f1235d 100644 --- a/cpdfcomposition.ml +++ b/cpdfcomposition.ml @@ -137,6 +137,9 @@ let show_composition_json filesize pdf = `Tuple [`String "XRef Table"; `Int xref_table; `Float (perc xref_table)]; `Tuple [`String "Unclassified"; `Int (filesize - r); `Float (perc (filesize - r))]] +let show_composition_json_blob filesize pdf = + Pdfio.bytes_of_string (Cpdfyojson.Safe.pretty_to_string (show_composition_json filesize pdf)) + let show_composition filesize json pdf = let module J = Cpdfyojson.Safe in let j = show_composition_json filesize pdf in diff --git a/cpdfcomposition.mli b/cpdfcomposition.mli index c1907ff..4dcd6c8 100644 --- a/cpdfcomposition.mli +++ b/cpdfcomposition.mli @@ -3,3 +3,5 @@ (** [show_composition filesize json pdf] prints the composition of a document to Standard Output. *) val show_composition : int -> bool -> Pdf.t -> unit + +val show_composition_json_blob : int -> Pdf.t -> Pdfio.bytes diff --git a/cpdfmanual.pdf b/cpdfmanual.pdf index c319a6d..53c6214 100644 Binary files a/cpdfmanual.pdf and b/cpdfmanual.pdf differ diff --git a/cpdfmanual.tex b/cpdfmanual.tex index 8eed1d8..8fdd2e4 100644 --- a/cpdfmanual.tex +++ b/cpdfmanual.tex @@ -2952,7 +2952,7 @@ given page range. \small\noindent\verb!cpdf -info [-raw | -utf8] in.pdf! \vspace{1.5mm} - \small\noindent\verb!cpdf -page-info in.pdf! + \small\noindent\verb!cpdf -page-info in.pdf []! \vspace{1.5mm} \small\noindent\verb!cpdf -pages in.pdf! diff --git a/cpdfmetadata.mli b/cpdfmetadata.mli index 8084a30..0033c75 100644 --- a/cpdfmetadata.mli +++ b/cpdfmetadata.mli @@ -79,3 +79,8 @@ val set_metadata_date : Pdf.t -> string -> Pdf.t (** Expands the date ["now"] to the date now. Leaves any other string alone. *) val expand_date : string -> string + +(** / **) +val get_catalog_item : string -> Pdf.t -> string + +val get_viewer_pref_item : string -> Pdf.t -> string