package cpdf

  1. Overview
  2. Docs
High-level PDF tools based on CamlPDF

Install

Dune Dependency

Authors

Maintainers

Sources

v2.6.tar.gz
md5=f69a01ef0f02a57d6c8e2e7b75984bca
sha512=482ffe027112d313f876758d83353c2952bf30e351748c2aa832f333da1683ad4adb813b6c3c87b77462b7da2922e38dd2d668bac6558ad315e1286a31446e1d

doc/cpdf/Cpdfembed/index.html

Module Cpdfembed

Embed a TrueType font in a PDF

type t = Pdftext.font list * (int, int * int) Hashtbl.t
type cpdffont =
  1. | PreMadeFontPack of t
  2. | EmbedInfo of {
    1. fontfile : Pdfio.bytes;
    2. fontname : string;
    3. encoding : Pdftext.encoding;
    }
  3. | ExistingNamedFont
val fontpack_of_standardfont : Pdftext.font -> t

Build a fontpack for a Standard 14 font

val get_char : t -> int -> (int * int * Pdftext.font) option

Look up a unicode codepoint in a font page. Returns (charcode, fontnumber, font)

val embed_truetype : Pdf.t -> fontfile:Pdfio.bytes -> fontname:string -> codepoints:int list -> encoding:Pdftext.encoding -> t

Build a fontpack from a TrueType font and list of codepoints, embedding its fonts in the document

val collate_runs : ('a * 'b * 'c) list -> ('a * 'b * 'c) list list

Collate outputs of get_char with like font

OCaml

Innovation. Community. Security.