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;
}
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
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_standard_font : standard_font -> string
val standard_font_of_name : string -> standard_font option
val string_of_font : font -> string
val read_font : Pdf.t -> Pdf.pdfobject -> font
val write_font : Pdf.t -> font -> int
val codepoints_of_utf8 : string -> int list
val utf8_of_codepoints : int list -> string
val utf8_of_pdfdocstring : string -> string
val pdfdocstring_of_utf8 : string -> string
val pdfdocstring_of_codepoints : int list -> string
val codepoints_of_pdfdocstring : string -> int list
type text_extractor
val text_extractor_of_font : Pdf.t -> Pdf.pdfobject -> text_extractor
val codepoints_of_text : text_extractor -> string -> int list
val glyphnames_of_text : text_extractor -> string -> string list
val charcode_extractor_of_encoding : encoding -> int -> int option
OCaml

Innovation. Community. Security.