Module Cpdfutil

module Cpdfutil: sig .. end

Utilities


val progress : bool Stdlib.ref

Turns Cpdf's progress-printing system on or off.

val progress_line : string -> unit

Print a progress line. E.g "Loading file foo.pdf" with a newline.

val progress_line_no_end : string -> unit

Print a progres line with no line ending.

val progress_page : int -> unit

Begin page progress - prints the page number.

val progress_endpage : unit -> unit

End page progress - prints a full stop.

val progress_done : unit -> unit

Print just a newline, for example when ending a page sequence.

val remove_dict_entry : Pdf.t -> string -> Pdf.pdfobject option -> unit

Remove a dictionary entry.

val replace_dict_entry : Pdf.t -> string -> Pdf.pdfobject -> Pdf.pdfobject option -> unit

Replace a dictionary entry.

val check_injectible : string -> unit

Check for injectible characters in a string, and error out if so.

type colour = 
| Grey of float
| RGB of float * float * float
| CMYK of float * float * float * float

PDF 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 = 
| LeftJustify
| CentreJustify
| RightJustify

Justification of multiline text