package camlpdf

  1. Overview
  2. Docs

Annotations

type style =
  1. | NoStyle
  2. | Solid
  3. | Dashed
  4. | Beveled
  5. | Inset
  6. | UnderlineStyle

Border styles

type border = {
  1. width : float;
  2. vradius : float;
  3. hradius : float;
  4. style : style;
  5. dasharray : int array;
}

Annotation borders.

type subtype =
  1. | Text
  2. | FreeText
  3. | Line
  4. | Square
  5. | Circle
  6. | Polygon
  7. | PolyLine
  8. | Highlight
  9. | Underline
  10. | Squiggly
  11. | StrikeOut
  12. | Stamp
  13. | Caret
  14. | Ink
  15. | Popup of t
  16. | FileAttachment
  17. | Sound
  18. | Movie
  19. | Widget
  20. | Screen
  21. | PrinterMark
  22. | TrapNet
  23. | Watermark
  24. | ThreeDee
  25. | Unknown of string

Annotation types

and t = {
  1. subtype : subtype;
  2. annot_contents : string option;
  3. subject : string option;
  4. rectangle : float * float * float * float;
  5. border : border;
  6. colour : (int * int * int) option;
  7. annotrest : Pdf.pdfobject;
}

Annotations.

val annotations_of_page : Pdf.t -> Pdfpage.t -> t list

Return the annotations on a page in a document.

val add_annotation : Pdf.t -> Pdfpage.t -> t -> Pdfpage.t

Add an annotation to a page in a document.

val make_border : ?vradius:float -> ?hradius:float -> ?style:style -> ?dasharray:int array -> float -> border

Make a border.

val make : ?content:string -> ?border:border -> ?rectangle:(float * float * float * float) -> ?colour:(int * int * int) -> ?subject:string -> subtype -> t

Make an annotation of a given subtype.

val transform_annotations : Pdf.t -> Pdftransform.transform_matrix -> Pdf.pdfobject -> unit

Transform all annotations in a document, e.g /Rect and /QuadPoints.

OCaml

Innovation. Community. Security.