2022-01-13 17:35:03 +01:00
|
|
|
(** Adding text *)
|
2021-12-21 15:00:58 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
(** Justification of multiline text *)
|
|
|
|
type justification =
|
|
|
|
| LeftJustify
|
|
|
|
| CentreJustify
|
|
|
|
| RightJustify
|
|
|
|
|
2022-09-12 18:05:20 +02:00
|
|
|
(** Call [add_texts linewidth outline fast fontname font bates batespad colour
|
2021-12-21 15:00:58 +01:00
|
|
|
position linespacing fontsize underneath text pages orientation
|
|
|
|
relative_to_cropbox midline_adjust topline filename pdf]. For details see cpdfmanual.pdf *)
|
|
|
|
val addtexts :
|
2022-09-24 11:55:12 +02:00
|
|
|
?embedinfo:(Pdf.t * Pdfio.bytes * string * Pdftext.encoding) ->
|
2021-12-21 15:00:58 +01:00
|
|
|
float -> (*linewidth*)
|
|
|
|
bool -> (*outline*)
|
|
|
|
bool -> (*fast*)
|
|
|
|
string -> (*fontname*)
|
2022-09-16 19:07:46 +02:00
|
|
|
Pdftext.font option -> (*font*)
|
2021-12-21 15:00:58 +01:00
|
|
|
int -> (* bates number *)
|
|
|
|
int option -> (* bates padding width *)
|
|
|
|
color -> (*colour*)
|
|
|
|
Cpdfposition.position -> (*position*)
|
|
|
|
float -> (*linespacing*)
|
|
|
|
float -> (*fontsize*)
|
|
|
|
bool -> (*underneath*)
|
|
|
|
string ->(*text*)
|
|
|
|
int list ->(*page range*)
|
|
|
|
bool ->(*relative to cropbox?*)
|
|
|
|
float ->(*opacity*)
|
|
|
|
justification ->(*justification*)
|
|
|
|
bool ->(*midline adjust?*)
|
|
|
|
bool ->(*topline adjust?*)
|
|
|
|
string ->(*filename*)
|
|
|
|
float option -> (*extract_text_font_size*)
|
|
|
|
string -> (* shift *)
|
|
|
|
?raw:bool -> (* raw *)
|
|
|
|
Pdf.t ->(*pdf*)
|
|
|
|
Pdf.t
|
|
|
|
|
2022-01-13 17:35:03 +01:00
|
|
|
(* Add a rectangle to the page *)
|
2021-12-21 15:00:58 +01:00
|
|
|
val addrectangle :
|
|
|
|
bool ->
|
|
|
|
float * float ->
|
|
|
|
color ->
|
|
|
|
bool ->
|
|
|
|
float ->
|
|
|
|
float ->
|
|
|
|
Cpdfposition.position ->
|
|
|
|
bool -> bool -> int list -> Pdf.t -> Pdf.t
|
|
|
|
|
2022-09-12 18:02:48 +02:00
|
|
|
(** Remove text added by Cpdfaddtext from the given pages. *)
|
2021-12-21 15:00:58 +01:00
|
|
|
val removetext : int list -> Pdf.t -> Pdf.t
|
|
|
|
|
2022-01-13 17:35:03 +01:00
|
|
|
(** Extract text *)
|
2021-12-21 15:00:58 +01:00
|
|
|
val extract_text : float option -> Pdf.t -> int list -> string
|
2022-01-13 17:35:03 +01:00
|
|
|
|
2022-09-12 18:02:48 +02:00
|
|
|
(** Remove all text from the given pages *)
|
2021-12-21 16:40:52 +01:00
|
|
|
val remove_all_text : int list -> Pdf.t -> Pdf.t
|