Ruby gem

PDFs from components, not cursor arithmetic

Describe the page with rows, columns, boxes, tables, text and images. A box-layout engine measures, places and paginates them; a small PDF writer embeds subsetted fonts and images. Standard library only.

Gemfile
gem "stationery"
No runtime dependencies

Standard library only. No Prawn, no headless Chrome, no native extensions, no other processes.

Declarative layout

Padding, backgrounds, borders, radii, column widths and page breaks are the engine's job.

Real typography

Subsetted TrueType and CFF fonts, GPOS kerning, justification and per-character fallback. Inter ships inside the gem.

Tables that paginate

Spans, zebra stripes, selections, repeating headers and rows that split across pages.

Links and outlines

Named anchors, internal links, PDF bookmarks and a table of contents with page numbers.

Testable

RSpec matchers, Minitest assertions, strict mode and Rails previews like ActionMailer's.