package cpdf

  1. Overview
  2. Docs

Adding text

type colour =
  1. | Grey of float
  2. | RGB of float * float * float
  3. | CYMK of float * float * float * float

Colours

val colour_op : colour -> Pdfops.t

Build a colour operation for filling with the given colour.

val colour_op_stroke : colour -> Pdfops.t

Build a colour operation for filing with the given colour

type justification =
  1. | LeftJustify
  2. | CentreJustify
  3. | RightJustify

Justification of multiline text

val addtexts : float -> bool -> bool -> string -> Cpdfembed.cpdffont -> int -> int option -> colour -> Cpdfposition.position -> float -> float -> bool -> string -> int list -> bool -> float -> justification -> bool -> bool -> string -> float option -> string -> ?raw:bool -> Pdf.t -> Pdf.t

Call add_texts 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) -> colour -> bool -> float -> float -> Cpdfposition.position -> bool -> bool -> int list -> Pdf.t -> Pdf.t

Add a rectangle to the given pages. addrectangle fast (w, h) colour outline linewidth opacity position relative_to_cropbox underneath range pdf.

OCaml

Innovation. Community. Security.