diff --git a/Changes b/Changes index ac1a614..e3b5689 100644 --- a/Changes +++ b/Changes @@ -1,10 +1,4 @@ -2.7.2 (to come) - -Fixes: - -o Removed setting of Producer field in AGPL version -* Removed long-deprecated -control -* More compact -print-struct-tree +2.7.2 (October 2024) New features: @@ -13,7 +7,7 @@ New features: * Create PDF/UA files from scratch with -create-pdf-ua-[1|2] * Create structure information for files with -draw * Draw can now make paragraphs with -para, -paras -* Add structure information to -typeset, add -subformat +* Add structure information to -typeset * -typeset can make PDF/UA documents * -jpeg, -png and friends can make PDF/UA documents * Merge PDF/UA-1 and PDF/UA-2 files, preserving standards compliance @@ -22,10 +16,13 @@ o -redact removes whole pages Extended features: -o Rectangle may be specified as x y x' y' rather than x y w h +o Rectangles may be specified as x y x' y' rather than x y w h Fixes: +o Removed setting of Producer field in AGPL version +* Removed long-deprecated -control +* More compact -print-struct-tree o -image-resolution-json was listing all images * = Supported by a grant from NLnet diff --git a/META b/META index b2ee50b..37528ba 100644 --- a/META +++ b/META @@ -1,6 +1,6 @@ name="cpdf" description="PDF commmand line tools" -version="2.7.1" +version="2.7.2" requires="camlpdf" archive(byte)="cpdf.cma" archive(native)="cpdf.cmxa" diff --git a/README.md b/README.md index 9d2c9d4..a88a6f9 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ To build -------- If downloading from Github, obtain the correct source. This means choosing the -tag for a particular version, such as "v2.7". The head of the master branch +tag for a particular version, such as "v2.7.2". The head of the master branch is unstable. 1. Type `make` to make the cpdf executable and the library diff --git a/cpdf.opam b/cpdf.opam index e86808d..e86c20e 100644 --- a/cpdf.opam +++ b/cpdf.opam @@ -1,6 +1,6 @@ opam-version: "2.0" name: "cpdf" -version: "2.7.1" +version: "2.7.2" maintainer: "contact@coherentgraphics.co.uk" license: "AGPL-3.0-or-later" build: [[make]] diff --git a/cpdfdraw.mli b/cpdfdraw.mli index 20bfa32..6fb7ff7 100644 --- a/cpdfdraw.mli +++ b/cpdfdraw.mli @@ -64,11 +64,13 @@ type drawops = | EndEltInfo of string | AutoTag of bool +(** When this is set, any untagged material is tagged as an artifact. *) val do_add_artifacts : bool ref +(** Set the role map. *) val rolemap : string ref -(** Calling [draw fast underneath filename bates batespad range pdf drawops] draws on +(** Calling [draw struct_tree fast underneath filename bates batespad range pdf drawops] draws on top of all the pages in the range. *) val draw : struct_tree:bool -> fast:bool -> diff --git a/cpdfpagespec.mli b/cpdfpagespec.mli index ab25f93..7edbd2b 100644 --- a/cpdfpagespec.mli +++ b/cpdfpagespec.mli @@ -33,4 +33,5 @@ val validate_pagespec : string -> bool x-y ranges etc. *) val string_of_pagespec : Pdf.t -> int list -> string +(** Invert a range, given the maximum page number and the range. *) val invert_range : int -> int list -> int list diff --git a/cpdftype.mli b/cpdftype.mli index 8946bf6..b120577 100644 --- a/cpdftype.mli +++ b/cpdftype.mli @@ -23,7 +23,9 @@ val font_widths : string -> Pdftext.font -> float -> float array (** Calculate the widths of a string given a font width table, and list of char codes *) val width_of_string : float array -> char list -> float -(** [typeset lmargin rmargin tmargin bmargin papersize pdf contents] builds a list of pages of typset content. *) +(** [typeset process_struct_tree lmargin rmargin tmargin bmargin papersize pdf contents] builds a + list of pages of typset content. *) val typeset : process_struct_tree:bool -> float -> float -> float -> float -> Pdfpaper.t -> Pdf.t -> t -> Pdfpage.t list * (string * int) list list +(** Add artifact markers to any un-marked part of the content stream. *) val add_artifacts : Pdfops.t list -> Pdfops.t list diff --git a/cpdfua.mli b/cpdfua.mli index a84126b..7714695 100644 --- a/cpdfua.mli +++ b/cpdfua.mli @@ -4,6 +4,7 @@ type subformat = | PDFUA1 | PDFUA2 +(** Parse PDF/UA-1 and PDF/UA-2 to the subformat type. *) val subformat_of_string : string -> subformat (** Print matterhorn test results ("" = all tests) *) @@ -30,6 +31,8 @@ val extract_struct_tree : Pdf.t -> Cpdfyojson.Safe.t (** Reapply an edited JSON structure tree to its PDF. *) val replace_struct_tree : Pdf.t -> Cpdfyojson.Safe.t -> unit +(* Make a blank PDF/UA-1 PDF given a title, paper size, and number of pages. *) val create_pdfua1 : string -> Pdfpaper.t -> int -> Pdf.t +(* Make a blank PDF/UA-2 PDF given a title, paper size, and number of pages. *) val create_pdfua2 : string -> Pdfpaper.t -> int -> Pdf.t