API Reference prawn_ex v#0.6.0

Copy Markdown View Source

Modules

Prawn-style declarative PDF generation for Elixir.

Bar and line charts using drawing primitives (rectangles, lines, text).

Document spec: immutable struct holding options and a list of pages.

Minimal TrueType (sfnt) parser — just enough metadata to embed a font in a PDF as a simple /TrueType font with WinAnsi encoding.

Loads JPEG for PDF embedding. Reads dimensions from SOF0/SOF2 and returns raw JPEG bytes (embedded as /DCTDecode stream).

Decodes PNG (8-bit truecolor RGB or RGBA, non-interlaced) to raw RGB bytes for PDF embedding (/DeviceRGB, /FlateDecode).

Margin box + vertical flow helpers on top of PrawnEx.

Minimal line-oriented markup → PrawnEx.Layout flow blocks (Phase D).

Builds PDF content stream bytes from a list of content operations.

Encodes values for PDF output: string escaping, name encoding.

Builds PDF indirect object definitions (catalog, pages, page, stream).

Serializes a PrawnEx.Document to PDF 1.4 binary.

Represents a single PDF page with a list of content operations.

Path builders shared by the public API and the chart renderers.

Table layout: draws a grid of cells with optional header row.

Text utilities: width estimation and line wrapping for PDF layout.

Unit conversion and standard page sizes for PDF.