camlpdf

Read, write and modify PDF files
Module Pdf
val is_delimiter : char -> bool
type saved_encryption = {
from_get_encryption_values : Pdfcryptprimitives.encryption * string * string * int32 * string * string option * string option;
encrypt_metadata : bool;
perms : string;
}
type deferred_encryption = {
crypt_type : Pdfcryptprimitives.encryption;
file_encryption_key : string option;
obj : int;
gen : int;
key : int array;
keylength : int;
r : int;
}
val print_deferred_encryption : deferred_encryption -> unit
type toget_crypt =
| NoChange
| ToDecrypt of deferred_encryption
type toget = {
input : Pdfio.input;
position : int;
length : int;
crypt : toget_crypt;
}
val toget : ?crypt:toget_crypt -> Pdfio.input -> int -> int -> toget
val length_of_toget : toget -> int
val position_of_toget : toget -> int
val input_of_toget : toget -> Pdfio.input
type stream =
| Got of Pdfio.bytes
| ToGet of toget
type pdfobject =
| Null
| Boolean of bool
| Integer of int
| Real of float
| String of string
| Name of string
| Array of pdfobject list
| Dictionary of (string * pdfobject) list
| Stream of (pdfobject * stream) ref
| Indirect of int
val string_of_pdf : ( pdfobject -> string ) ref
type objectdata =
| Parsed of pdfobject
| ParsedAlreadyDecrypted of pdfobject
| ToParse
| ToParseFromObjectStream of ( int, int list ) Hashtbl.t * int * int * int -> int list -> (int * (objectdata ref * int)) list
type pdfobjmap_key = int
type pdfobjmap = ( int, objectdata ref * int ) Hashtbl.t
val pdfobjmap_empty : unit -> pdfobjmap
val pdfobjmap_find : 'a -> ( 'b, 'c ) Hashtbl.t -> 'd
val pdfobjmap_add : 'a -> 'b -> ( 'c, 'd ) Hashtbl.t -> ( 'c, 'd ) Hashtbl.t
val pdfobjmap_bindings_inorder : ( 'a, 'b ) Hashtbl.t -> ('c * 'd) list
val pdfobjmap_iter_inorder : ( 'a -> 'b -> unit ) -> ( 'c, 'd ) Hashtbl.t -> unit
val pdfobjmap_bindings : ( 'a, 'b ) Hashtbl.t -> ('c * 'd) list
val pdfobjmap_iter : ( 'a -> 'b -> unit ) -> ( 'a, 'b ) Hashtbl.t -> unit
val pdfobjmap_remove : 'a -> ( 'b, 'c ) Hashtbl.t -> ( 'b, 'c ) Hashtbl.t
type pdfobjects = {
mutable maxobjnum : int;
mutable parse : ( pdfobjmap_key -> pdfobject ) option;
mutable pdfobjects : pdfobjmap;
mutable object_stream_ids : ( int, int ) Hashtbl.t;
}
type t = {
mutable major : int;
mutable minor : int;
mutable root : int;
mutable objects : pdfobjects;
mutable trailerdict : pdfobject;
mutable was_linearized : bool;
mutable saved_encryption : saved_encryption option;
}
val empty : unit -> t
exception PDFError of string
val input_pdferror : Pdfio.input -> string -> string
val is_whitespace : char -> bool
val is_not_whitespace : char -> bool
val process_deferred_cryption : toget_crypt -> Pdfio.bytes -> Pdfio.bytes
val remove_string_compare : string -> (string * 'a) list -> (string * 'a) list
val remove_dict_entry : pdfobject -> string -> pdfobject
val replace_dict_entry : pdfobject -> string -> pdfobject -> pdfobject
val add_dict_entry : pdfobject -> string -> pdfobject -> pdfobject
val getstream : pdfobject -> unit
val recurse_array : ( pdfobject -> pdfobject ) -> pdfobject list -> pdfobject
val recurse_dict_inner : ( 'a -> 'b ) -> ('c * 'd) list -> ('e * 'f) list -> ('c * 'd) list
val recurse_dict : ( pdfobject -> pdfobject ) -> (string * pdfobject) list -> pdfobject
val getnum : pdfobject -> float
val parse_rectangle : pdfobject -> float * float * float * float
val change_obj : t -> int -> pdfobject -> unit
val parse_lazy : t -> pdfobjmap_key -> pdfobject
val removeobj : t -> int -> unit
val lookup_obj : t -> pdfobjmap_key -> pdfobject
val parse_delayed_object_stream : ( pdfobjmap_key, int list ) Hashtbl.t -> pdfobjmap_key -> int -> t -> ( int -> int list -> (pdfobjmap_key * (objectdata ref * int)) list ) -> pdfobject
val resolve_all_delayed_object_streams : t -> unit
val catalog_of_pdf : t -> pdfobject
val direct : t -> pdfobject -> pdfobject
val iter_stream : ( pdfobject -> unit ) -> t -> unit
val lookup_string_compare : string -> (string * 'a) list -> 'b option
val lookup_direct : t -> string -> pdfobject -> pdfobject option
val indirect_number : t -> string -> pdfobject -> int option
val lookup_direct_orelse : t -> string -> string -> pdfobject -> pdfobject option
val lookup_exception : exn -> t -> string -> pdfobject -> pdfobject
val lookup_fail : string -> t -> string -> pdfobject -> pdfobject
val parse_matrix : t -> string -> pdfobject -> Pdftransform.transform_matrix
val objiter : ( pdfobjmap_key -> pdfobject -> unit ) -> t -> unit
val objselfmap : ( pdfobject -> pdfobject ) -> t -> unit
val objiter_inorder : ( pdfobjmap_key -> pdfobject -> unit ) -> t -> unit
val objiter_gen : ( pdfobjmap_key -> int -> pdfobject -> unit ) -> t -> unit
val objnumbers : t -> pdfobjmap_key list
val objcard : t -> int
val list_of_objs : t -> (pdfobjmap_key * objectdata) list
val addobj_given_num : t -> (int * pdfobject) -> unit
val addobj : t -> pdfobject -> int
val objects_of_list : ( pdfobjmap_key -> pdfobject ) option -> (int * (objectdata ref * int)) list -> pdfobjects
val page_reference_numbers_inner : t -> pdfobject -> int -> int list
val page_reference_numbers : t -> int list
val renumber_object_parsed : t -> ( int, int ) Hashtbl.t -> pdfobject -> pdfobject
val renumber_object : t -> ( int, int ) Hashtbl.t -> pdfobjmap_key -> objectdata -> pdfobject
val changes : t -> ( pdfobjmap_key, int ) Hashtbl.t
val renumber : ( pdfobjmap_key, int ) Hashtbl.t -> t -> t
val renumber_pdfs : t list -> t list
val allfalse : bool list -> bool
val containing : ('a * pdfobject) list -> ('b * pdfobject) -> bool
val tocontinue : 'a list -> ('b * pdfobject) list -> ('b * pdfobject) list -> bool
val refset_empty : unit -> ( 'a, 'b ) Hashtbl.t
val refset_add : 'a -> ( 'b, unit ) Hashtbl.t -> ( 'b, unit ) Hashtbl.t
val refset_mem : 'a -> ( 'b, 'c ) Hashtbl.t -> bool
val refset_elts : ( 'a, 'b ) Hashtbl.t -> 'c list
val referenced_pdfobj : string list -> (string * pdfobject) list -> t -> ( int, unit ) Hashtbl.t ref -> pdfobjmap_key -> pdfobject -> unit
val referenced : string list -> (string * pdfobject) list -> t -> ( int, unit ) Hashtbl.t ref -> pdfobjmap_key -> objectdata -> unit
val nullify_deleted_page_references : t -> unit
val remove_unreferenced : t -> unit
val objects_referenced : string list -> (string * pdfobject) list -> t -> pdfobject -> int list
val bigarray_of_stream : pdfobject -> Pdfio.bytes
val unique_key : string -> pdfobject -> string
val generate_id : 'a -> string -> ( unit -> float ) -> pdfobject
val find_indirect : string -> pdfobject -> int option
val nametree_lookup_kids : t -> pdfobject -> pdfobject -> pdfobject option
val array_lookup : pdfobject -> pdfobject -> pdfobject option
val nametree_lookup : t -> pdfobject -> pdfobject -> pdfobject option
val contents_of_nametree : t -> pdfobject -> (pdfobject * pdfobject) list
val deep_copy_pdfobjects : t -> ( int, objectdata ref * int ) Hashtbl.t -> pdfobjmap
val deep_copy : t -> t
val change_id : t -> string -> unit