Documentation for new v2.6 features

This commit is contained in:
John Whitington 2023-07-27 12:05:18 +01:00
parent b70c25a006
commit 7fc9bea729
10 changed files with 27 additions and 13 deletions

View File

@ -1,2 +1,4 @@
(* Standard CSS Colours *)
(** Standard CSS Colours *)
(** Standard CSS Colours, names in lowercase. *)
val colours : (string * int) list

View File

@ -1,4 +1,4 @@
(** PDF Command Line Tools in library form. *)
(** PDF Command Line Tools in library form *)
(** Call the command line tools with the contents of [Sys.argv] *)
val go : unit -> unit

View File

@ -1 +1,5 @@
(** Show composition of a PDF *)
(** [show_composition filesize json pdf] prints the composition of a document to
Standard Output. *)
val show_composition : int -> bool -> Pdf.t -> unit

View File

@ -1,4 +1,7 @@
(** Extract text *)
(** Experimental text extractor *)
(** Extract page text for a given page. *)
val extract_page_text : float option -> Pdf.t -> 'a -> Pdfpage.t -> string
(** Extract page text for given page range. *)
val extract_text : float option -> Pdf.t -> int list -> string

View File

@ -1,2 +1,4 @@
(** Return the dimensions of a JPEG *)
(** JPEG Utilities *)
(** Return the width and height of a JPEG *)
val jpeg_dimensions : Pdfio.bytes -> int * int

View File

@ -1,7 +1,5 @@
(** Working with pages *)
val change_pattern_matrices_page : Pdf.t -> Pdftransform.transform_matrix -> Pdfpage.t -> Pdfpage.t
(** Print page info (Mediabox etc) to standard output. *)
val output_page_info : Pdf.t -> int list -> unit
@ -117,3 +115,6 @@ val copy_box : string -> string -> bool -> Pdf.t -> int list -> Pdf.t
(** True if all pages are "upright" i.e no rotation and (0,0)-based. *)
val allupright : int list -> Pdf.t -> bool
(** When a page is transformed, its patterns must be too. *)
val change_pattern_matrices_page : Pdf.t -> Pdftransform.transform_matrix -> Pdfpage.t -> Pdfpage.t

View File

@ -1,4 +1,4 @@
(* Read and write non-interlaced, non-transparent 24 bit PNGs. Such a PNG may
(* Read non-interlaced, non-transparent 24 bit PNGs. Such a PNG may
be loaded into a PDF simply by extracting its width and height from the
IHDR, and concatenating all its IDAT data sections together. *)
open Pdfutil

View File

@ -1,11 +1,10 @@
(* PNG files, represented only to the extent required to roundtrip PDF image objects *)
(** Read PNG files *)
(** PNG files, represented only to the extent required to insert as PDF image objects *)
type t =
{width : int;
height : int;
idat : Pdfio.bytes}
(* Read a non-interlaced, non-transparent 24 bit PNG for inclusion in a PDF file. *)
(** Read a non-interlaced, non-transparent 24 bit PNG for inclusion in a PDF file. *)
val read_png : Pdfio.input -> t
(* Write a non-interlaced, non-transparent 24 bit PNG from PDF image contents *)
val write_png : t -> Pdfio.output -> unit

View File

@ -1,4 +1,6 @@
(** Remove text added by Cpdfaddtext from the given pages. *)
(** Remove text from documents *)
(** Remove text added by [Cpdfaddtext] from the given pages. *)
val removetext : int list -> Pdf.t -> Pdf.t
(** Remove all text from the given pages *)

View File

@ -19,6 +19,7 @@ type subpath = hole * closure * segment list
(* A path is made from a number of subpaths. *)
type path = winding_rule * subpath list
(** The factor by which the radius of a circle is multiplied to find the length
of the bezier control lines when approximating quarter arcs to make circles. *)
val kappa : float