cpdf

High-level PDF tools based on CamlPDF
Module Cpdfaddtext
type color =
| Grey of float
| RGB of float * float * float
| CYMK of float * float * float * float
val colour_op : color -> Pdfops.t
val colour_op_stroke : color -> Pdfops.t
type justification =
| LeftJustify
| CentreJustify
| RightJustify

Justification of multiline text

val addtexts : bool -> float -> bool -> bool -> string -> Pdftext.standard_font option -> bool -> int -> int option -> color -> Cpdfposition.position -> float -> float -> bool -> string -> int list -> Cpdfposition.orientation -> bool -> float -> justification -> bool -> bool -> string -> float option -> string -> ?raw:bool -> Pdf.t -> Pdf.t

Call add_texts metrics linewidth outline fast fontname font bates batespad colour position linespacing fontsize underneath text pages orientation relative_to_cropbox midline_adjust topline filename pdf. For details see cpdfmanual.pdf

val addrectangle : bool -> (float * float) -> color -> bool -> float -> float -> Cpdfposition.position -> bool -> bool -> int list -> Pdf.t -> Pdf.t
val metrics_howmany : unit -> int
val metrics_text : int -> string
val metrics_x : int -> float
val metrics_y : int -> float
val metrics_rot : int -> float
val metrics_baseline_adjustment : unit -> float

These functions returns some details about the text if addtexts is called with metrics true. The integer arguments are 1 for the first one, 2 for the second etc. Call metrics_howmany first to find out how many.

val removetext : int list -> Pdf.t -> Pdf.t

Remove text from the given pages.

val extract_text : float option -> Pdf.t -> int list -> string

Extract text

val remove_all_text : int list -> Pdf.t -> Pdf.t

Remove text