package camlpdf

  1. Overview
  2. Docs
type toget
type stream =
  1. | Got of Pdfio.bytes
  2. | ToGet of toget
type pdfobject =
  1. | Null
  2. | Boolean of bool
  3. | Integer of int
  4. | Real of float
  5. | String of string
  6. | Name of string
  7. | Array of pdfobject list
  8. | Dictionary of (string * pdfobject) list
  9. | Stream of (pdfobject * stream) ref
  10. | Indirect of int
type objectdata =
  1. | Parsed of pdfobject
  2. | ParsedAlreadyDecrypted of pdfobject
  3. | ToParse
  4. | ToParseFromObjectStream of (int, int list) Hashtbl.t * int * int * int -> int list -> (int * (objectdata ref * int)) list
type pdfobjmap_key = int
type pdfobjmap = (pdfobjmap_key, objectdata ref * int) Hashtbl.t
val pdfobjmap_empty : unit -> pdfobjmap
val pdfobjmap_find : pdfobjmap_key -> pdfobjmap -> objectdata ref * int
type pdfobjects = {
  1. mutable maxobjnum : int;
  2. mutable parse : (pdfobjmap_key -> pdfobject) option;
  3. mutable pdfobjects : pdfobjmap;
  4. mutable object_stream_ids : (int, int) Hashtbl.t;
}
type saved_encryption = {
  1. from_get_encryption_values : Pdfcryptprimitives.encryption * string * string * int32 * string * string option * string option;
  2. encrypt_metadata : bool;
  3. perms : string;
}
type deferred_encryption = {
  1. crypt_type : Pdfcryptprimitives.encryption;
  2. file_encryption_key : string option;
  3. obj : int;
  4. gen : int;
  5. key : int array;
  6. keylength : int;
  7. r : int;
}
type t = {
  1. mutable major : int;
  2. mutable minor : int;
  3. mutable root : int;
  4. mutable objects : pdfobjects;
  5. mutable trailerdict : pdfobject;
  6. mutable was_linearized : bool;
  7. mutable saved_encryption : saved_encryption option;
}
val empty : unit -> t
exception PDFError of string
val input_pdferror : Pdfio.input -> string -> string
val getstream : pdfobject -> unit
val getnum : pdfobject -> float
val lookup_obj : t -> int -> pdfobject
val lookup_fail : string -> t -> string -> pdfobject -> pdfobject
val lookup_exception : exn -> t -> string -> pdfobject -> pdfobject
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 remove_dict_entry : pdfobject -> string -> pdfobject
val replace_dict_entry : pdfobject -> string -> pdfobject -> pdfobject
val add_dict_entry : pdfobject -> string -> pdfobject -> pdfobject
val direct : t -> pdfobject -> pdfobject
val objcard : t -> int
val removeobj : t -> int -> unit
val addobj : t -> pdfobject -> int
val addobj_given_num : t -> (int * pdfobject) -> unit
val parse_rectangle : pdfobject -> float * float * float * float
val parse_matrix : t -> string -> pdfobject -> Pdftransform.transform_matrix
val renumber_pdfs : t list -> t list
val unique_key : string -> pdfobject -> string
val objiter : (int -> pdfobject -> unit) -> t -> unit
val objiter_inorder : (int -> pdfobject -> unit) -> t -> unit
val objiter_gen : (int -> int -> pdfobject -> unit) -> t -> unit
val objselfmap : (pdfobject -> pdfobject) -> t -> unit
val iter_stream : (pdfobject -> unit) -> t -> unit
val remove_unreferenced : t -> unit
type toget_crypt =
  1. | NoChange
  2. | ToDecrypt of deferred_encryption
val length_of_toget : toget -> int
val input_of_toget : toget -> Pdfio.input
val position_of_toget : toget -> int
val toget : ?crypt:toget_crypt -> Pdfio.input -> int -> int -> toget
val changes : t -> (int, int) Hashtbl.t
val renumber : (int, int) Hashtbl.t -> t -> t
val is_whitespace : char -> bool
val is_not_whitespace : char -> bool
val recurse_dict : (pdfobject -> pdfobject) -> (string * pdfobject) list -> pdfobject
val recurse_array : (pdfobject -> pdfobject) -> pdfobject list -> pdfobject
val bigarray_of_stream : pdfobject -> Pdfio.bytes
val objnumbers : t -> int list
val objects_of_list : (int -> pdfobject) option -> (int * (objectdata ref * int)) list -> pdfobjects
val objects_referenced : string list -> (string * pdfobject) list -> t -> pdfobject -> int list
val generate_id : t -> string -> (unit -> float) -> pdfobject
val is_delimiter : char -> bool
val page_reference_numbers : t -> int list
val catalog_of_pdf : t -> pdfobject
val find_indirect : string -> pdfobject -> int option
val renumber_object_parsed : t -> (int, int) Hashtbl.t -> pdfobject -> pdfobject
val nametree_lookup : t -> pdfobject -> pdfobject -> pdfobject option
val contents_of_nametree : t -> pdfobject -> (pdfobject * pdfobject) list
val deep_copy : t -> t
val string_of_pdf : (pdfobject -> string) ref
OCaml

Innovation. Community. Security.