Skip to content

Latest commit

 

History

History

Examples

What the writer can put on a page, as PDFs you can open before installing anything.

These are the primitives rather than finished documents — this package is the framework, and swift-invoice-pdf and swift-resume-pdf are what finished documents look like. Somebody evaluating this is deciding whether the page will hold what they need, and a feature list does not answer that.

Generated by the writer itself — WRITE_EXAMPLES=1 swift test --filter ExampleTests — so none of them can drift from what the code produces, and every one is proved to render on each test run.

tables Proportional columns, alignment, striping, a total row, measured truncation
multi-page A table breaking across pages, the header repeating, the footer knowing the final count
curves Circles, rings, arcs, rounded rectangles and meters, from Béziers rather than approximated
vector-path One SVG path stamped at four scales — zoom in, the edges stay sharp
typography The base-14 fonts, and an embedded family in four weights and an italic beside them
justified The same paragraph ragged and justified, side by side
beyond-latin1 Cyrillic, Greek and CJK with a fallback face and without
pictures A JPEG passed through undecoded, a PNG with its transparency intact, both over a tint
locked Encrypted with AES-256 — the password is sample (the only example that differs on every regeneration, because its key is random)
links Clickable text — an annotation measured against the run it covers
watermarks DRAFT behind the content, and the alpha and rotation it is made of
qr An EPC payment payload at three sizes and four correction levels
bookmarks Three pages with an outline — open the sidebar
attachments An XML file carried inside the PDF, which is what an e-invoice is