camlpdf

Read, write and modify PDF files
Library camlpdf
Module Pdffun
type calculator =
| If of calculator list
| IfElse of calculator list * calculator list
| Bool of bool
| Float of float
| Int of int32
| Abs
| Add
| Atan
| Ceiling
| Cos
| Cvi
| Cvr
| Div
| Exp
| Floor
| Idiv
| Ln
| Log
| Mod
| Mul
| Neg
| Round
| Sin
| Sqrt
| Sub
| Truncate
| And
| Bitshift
| Eq
| Ge
| Gt
| Le
| Lt
| Ne
| Not
| Or
| Xor
| Copy
| Exch
| Pop
| Dup
| Index
| Roll
type sampled = {
size : int list;
order : int;
encode : float list;
decode : float list;
bps : int;
samples : int32 array;
}
and interpolation = {
c0 : float list;
c1 : float list;
n : float;
}
and stitching = {
functions : t list;
bounds : float list;
stitch_encode : float list;
}
and pdf_fun_kind =
| Interpolation of interpolation
| Stitching of stitching
| Sampled of sampled
| Calculator of calculator list
and t = {
func : pdf_fun_kind;
domain : float list;
range : float list option;
}
val string_of_calculator_inner : calculator -> string
val string_of_calculator : calculator list -> string
val print_function : t -> unit
val keyword_of_string : string -> calculator
val parse_calculator : string -> calculator list
val parse_function : Pdf.t -> Pdf.pdfobject -> t
exception BadFunctionEvaluation of string
val interpolate : float -> float -> float -> float -> float -> float
val eval_function_sampled : t -> sampled -> float list -> float list
val eval_function_calculator : float list -> calculator list -> float list
val eval_function : t -> float list -> float list
val funtype_of_function : t -> int
val mkreal : float -> Pdf.pdfobject
val entries_of_interpolation : interpolation -> (string * Pdf.pdfobject) list
val entries_of_stitching : Pdf.t -> stitching -> (string * Pdf.pdfobject) list
val extra_entries_of_function : Pdf.t -> t -> (string * Pdf.pdfobject) list
val pdfobject_of_function : Pdf.t -> t -> Pdf.pdfobject