package cpdf

  1. Overview
  2. Docs

Draw on PDFs

type colspec =
  1. | NoCol
  2. | RGB of float * float * float
  3. | Grey of float
  4. | CYMK of float * float * float * float
type drawops =
  1. | Rect of float * float * float * float
  2. | Bezier of float * float * float * float * float * float
  3. | Bezier23 of float * float * float * float
  4. | Bezier13 of float * float * float * float
  5. | To of float * float
  6. | Line of float * float
  7. | ClosePath
  8. | SetFill of colspec
  9. | SetStroke of colspec
  10. | SetLineThickness of float
  11. | SetLineCap of int
  12. | SetLineJoin of int
  13. | SetMiterLimit of float
  14. | SetDashPattern of float list * float
  15. | Matrix of Pdftransform.transform_matrix
  16. | Qq of drawops list
  17. | Fill
  18. | FillEvenOdd
  19. | Stroke
  20. | FillStroke
  21. | FillStrokeEvenOdd
  22. | Clip
  23. | ClipEvenOdd
  24. | FormXObject of float * float * float * float * string * drawops list
  25. | Use of string
  26. | ImageXObject of string * Pdf.pdfobject
  27. | Image of string
  28. | NewPage
  29. | Opacity of float
  30. | SOpacity of float
  31. | FontPack of string * Cpdfembed.cpdffont * (int, unit) Hashtbl.t
  32. | Font of string * float
  33. | TextSection of drawops list
  34. | Text of string
  35. | SpecialText of string
  36. | Newline
  37. | Leading of float
  38. | CharSpace of float
  39. | WordSpace of float
  40. | TextScale of float
  41. | RenderMode of int
  42. | Rise of float
val draw : ?fast:bool -> ?underneath:bool -> filename:string -> bates:int -> batespad:int option -> int list -> Pdf.t -> drawops list -> Pdf.t

Calling draw fast underneath filename bates batespad range pdf drawops draws on top of all the pages in the range.

OCaml

Innovation. Community. Security.