package camlpdf

  1. Overview
  2. Docs
type type3_glpyhs = {
  1. fontbbox : float * float * float * float;
  2. fontmatrix : Pdftransform.transform_matrix;
  3. charprocs : (string * Pdf.pdfobject) list;
  4. type3_resources : Pdf.pdfobject;
}
type simple_fonttype =
  1. | Type1
  2. | MMType1
  3. | Type3 of type3_glpyhs
  4. | Truetype
type fontmetrics = float array
type fontfile =
  1. | FontFile of int
  2. | FontFile2 of int
  3. | FontFile3 of int
type fontdescriptor = {
  1. ascent : float;
  2. descent : float;
  3. leading : float;
  4. avgwidth : float;
  5. maxwidth : float;
  6. fontfile : fontfile option;
  7. charset : string list option;
  8. tounicode : (int, string) Hashtbl.t option;
}
type differences = (string * int) list
type encoding =
  1. | ImplicitInFontFile
  2. | StandardEncoding
  3. | MacRomanEncoding
  4. | WinAnsiEncoding
  5. | MacExpertEncoding
  6. | CustomEncoding of encoding * differences
  7. | FillUndefinedWithStandard of encoding
type simple_font = {
  1. fonttype : simple_fonttype;
  2. basefont : string;
  3. fontmetrics : fontmetrics option;
  4. fontdescriptor : fontdescriptor option;
  5. encoding : encoding;
}
type standard_font =
  1. | TimesRoman
  2. | TimesBold
  3. | TimesItalic
  4. | TimesBoldItalic
  5. | Helvetica
  6. | HelveticaBold
  7. | HelveticaOblique
  8. | HelveticaBoldOblique
  9. | Courier
  10. | CourierBold
  11. | CourierOblique
  12. | CourierBoldOblique
  13. | Symbol
  14. | ZapfDingbats
val string_of_standard_font : standard_font -> string
type cid_system_info = {
  1. registry : string;
  2. ordering : string;
  3. supplement : int;
}
type composite_CIDfont = {
  1. cid_system_info : cid_system_info;
  2. cid_basefont : string;
  3. cid_fontdescriptor : fontdescriptor;
  4. cid_widths : (int * float) list;
  5. cid_default_width : int;
}
type cmap_encoding =
  1. | Predefined of string
  2. | CMap of int
type font =
  1. | StandardFont of standard_font * encoding
  2. | SimpleFont of simple_font
  3. | CIDKeyedFont of string * composite_CIDfont * cmap_encoding
val string_of_fonttype : simple_fonttype -> string
val string_of_encoding : encoding -> string
val string_of_simple_font : simple_font -> string
val string_of_font : font -> string
val read_type3_data : Pdf.t -> Pdf.pdfobject -> type3_glpyhs
val simple_fonttype_of_string : Pdf.t -> Pdf.pdfobject -> string -> simple_fonttype option
val read_basefont : Pdf.t -> Pdf.pdfobject -> string
val parse_charset : string -> string list
val read_fontdescriptor : Pdf.t -> Pdf.pdfobject -> fontdescriptor option
val read_metrics : Pdf.t -> Pdf.pdfobject -> float array option
val pairs_of_differences : Pdf.t -> Pdf.pdfobject -> (string * int) list
val standard_font_of_name : string -> standard_font option
val is_standard14font : Pdf.t -> Pdf.pdfobject -> bool
val is_embedded : Pdf.t -> Pdf.pdfobject -> bool
val is_symbolic : Pdf.t -> Pdf.pdfobject -> bool
val read_encoding : Pdf.t -> Pdf.pdfobject -> encoding
val read_simple_font : Pdf.t -> Pdf.pdfobject -> font
val read_standard14font : Pdf.t -> Pdf.pdfobject -> font
val is_simple_font : Pdf.t -> Pdf.pdfobject -> bool
val is_cidkeyed_font : Pdf.t -> Pdf.pdfobject -> bool
val read_cid_system_info : Pdf.t -> Pdf.pdfobject -> cid_system_info
val read_cid_widths : Pdf.pdfobject list -> (int * float) list
val read_descendant : Pdf.t -> Pdf.pdfobject -> composite_CIDfont
val read_cidkeyed_font : Pdf.t -> Pdf.pdfobject -> font
type section =
  1. | BfChar of char list
  2. | BfRange of char list
val getuntilend : char list -> char list -> char list * char list
val getuntilend_range : char list -> char list -> char list * char list
val get_section : char list -> (section * char list) option
val read_number : char list -> int * char list
val fail : unit -> 'a
val read_unicode : char list -> string * char list
val get_sections : char list -> section list
val pairs_of_section : section -> (int * string) list
val parse_tounicode : Pdf.t -> Pdf.pdfobject -> (int * string) list
val add_tounicode : Pdf.t -> font -> Pdf.pdfobject -> font
val find_tounicode : font -> (int, string) Hashtbl.t option
val read_font : Pdf.t -> Pdf.pdfobject -> font
val make_font : string -> Pdf.pdfobject
val write_encoding : Pdf.t -> encoding -> int
val write_font : Pdf.t -> font -> int
type text_extractor = {
  1. convert : int -> string * int list;
  2. font : font;
}
val utf16be_of_codepoint : int -> int list
val utf16be_of_codepoints : int list -> string
val fail2 : unit -> 'a
val codepoints_of_utf16be_inner : int list -> int list -> int list
val codepoints_of_utf16be : string -> int list
val add_encoding : (differences -> unit) -> encoding -> unit
val table_of_encoding : encoding -> (int, string) Hashtbl.t
val reverse_table_of_encoding : encoding -> (string, int) Hashtbl.t
val text_extractor_of_font_real : font -> text_extractor
val text_extractor_of_font : Pdf.t -> Pdf.pdfobject -> text_extractor
val is_identity_h : font -> bool
val glyphnames_and_codepoints_of_text : text_extractor -> string -> (string * int list) list
val codepoints_of_text : text_extractor -> string -> int list
val glyphnames_of_text : text_extractor -> string -> string list
val charcode_extractor_of_font_real : ?debug:bool -> font -> int -> int option
val charcode_extractor_of_font : ?debug:bool -> Pdf.t -> Pdf.pdfobject -> int -> int option
val is_unicode : string -> bool
val codepoint_of_pdfdocencoding_character : int -> int option
val get_utf8_chars : int -> int list
val utf8_of_codepoints : int list -> string
val codepoints_of_pdfdocstring : string -> int list
val utf8_of_pdfdocstring : string -> string
val codepoints_of_utf8 : string -> int list
val pdfdocencoding_of_codepoints : int list -> int list -> int list
val pdfdocstring_of_codepoints : int list -> string
val pdfdocstring_of_utf8 : string -> string
val simplify_utf16be : string -> string
OCaml

Innovation. Community. Security.