cpdf-source/cpdfdraw.mli

77 lines
1.9 KiB
OCaml
Raw Normal View History

2023-07-27 14:21:15 +02:00
(** Draw on PDFs *)
2022-12-22 17:20:00 +01:00
type colspec =
2022-12-15 13:41:19 +01:00
NoCol
| RGB of float * float * float
| Grey of float
| CYMK of float * float * float * float
2024-09-12 17:08:05 +02:00
type justification =
Left | Right | Centre
2022-12-15 13:41:19 +01:00
type drawops =
2022-12-21 17:09:04 +01:00
| Rect of float * float * float * float
| Bezier of float * float * float * float * float * float
2023-05-12 20:01:59 +02:00
| Bezier23 of float * float * float * float
| Bezier13 of float * float * float * float
2022-12-15 13:41:19 +01:00
| To of float * float
| Line of float * float
2022-12-16 14:13:55 +01:00
| ClosePath
2022-12-22 17:20:00 +01:00
| SetFill of colspec
| SetStroke of colspec
2022-12-15 15:20:41 +01:00
| SetLineThickness of float
| SetLineCap of int
| SetLineJoin of int
| SetMiterLimit of float
| SetDashPattern of float list * float
2022-12-16 13:13:38 +01:00
| Matrix of Pdftransform.transform_matrix
2023-05-09 15:30:30 +02:00
| Qq of drawops list
2022-12-16 14:13:55 +01:00
| Fill
| FillEvenOdd
| Stroke
| FillStroke
| FillStrokeEvenOdd
2022-12-21 17:40:13 +01:00
| Clip
| ClipEvenOdd
2023-05-04 14:53:49 +02:00
| FormXObject of float * float * float * float * string * drawops list
2023-05-03 15:19:55 +02:00
| Use of string
2022-12-22 21:42:55 +01:00
| ImageXObject of string * Pdf.pdfobject
2024-09-11 14:57:57 +02:00
| Image of string * string option
2023-04-27 20:14:58 +02:00
| NewPage
| Opacity of float
| SOpacity of float
| FontPack of string * Cpdfembed.cpdffont * (int, unit) Hashtbl.t
| Font of string * float
2023-05-09 15:30:30 +02:00
| TextSection of drawops list
2023-04-27 20:14:58 +02:00
| Text of string
2023-05-02 15:47:18 +02:00
| SpecialText of string
2024-09-19 15:41:51 +02:00
| Para of justification * float * string list
2023-04-28 20:03:10 +02:00
| Newline
2023-05-01 15:39:42 +02:00
| Leading of float
| CharSpace of float
| WordSpace of float
| TextScale of float
| RenderMode of int
| Rise of float
2024-09-16 19:34:44 +02:00
| Tag of string
| EndTag
| STag of string
| EndSTag
| BeginArtifact
| EndArtifact
2024-09-18 16:31:24 +02:00
| Namespace of string
val do_add_artifacts : bool ref
2022-12-15 13:41:19 +01:00
2024-09-16 19:34:44 +02:00
val do_auto_tag : bool ref
2023-07-27 14:21:15 +02:00
(** Calling [draw fast underneath filename bates batespad range pdf drawops] draws on
top of all the pages in the range. *)
2024-09-06 15:04:17 +02:00
val draw : struct_tree:bool ->
fast:bool ->
underneath:bool ->
2023-05-11 20:18:14 +02:00
filename:string ->
2023-05-02 15:47:18 +02:00
bates:int ->
batespad:int option ->
2023-07-27 14:21:15 +02:00
int list -> Pdf.t -> drawops list -> Pdf.t