lightweight-pdfv0.3.0

Changelog

Generated from CHANGELOG.md in the project repository. Never maintained twice.

Unreleased

  • addedTable cell vertical alignment (VerticalAlign::Top, Middle, Bottom) on TableCell, TableColumn, and Table, plus Table::min_row_height so fixed-size grids can centre their content (#35).
  • addedSource Sans 3 Medium font weight behind optional default-fonts-medium feature (#36).
  • addedMeasurement API: measure_text and measure_element in Rust and JavaScript WASM bindings (#37).
  • addedPublished Architecture Decision Records (ADR-001 through ADR-019) under docs/adr/ (#30).
  • addedPrepared @casoon/lightweight-pdf npm package version 0.3.0 (#38).
  • fixedRich text: the space of every font used in a Text::rich span is embedded. Before, a font used only in rich text (e.g. an italic span) lacked it, so the gaps before its words came out too wide and lines ran past their box.

0.3.0

1 September 2026

  • addedPDF/A-3b output with Document::pdf_a3b() (pdf-a feature), verified with veraPDF (#25).
  • addedZUGFeRD/Factur-X invoice XML embedding with Document::zugferd_xml() (zugferd feature), verified with veraPDF and Mustang (#26).
  • addedTagged PDF/PDF-UA-1 output with Document::pdf_ua() (tagged-pdf feature), verified with veraPDF (#27).
  • addedlwpdf command-line tool: render, validate, fonts and schema (#19).
  • addedData-driven JSON templates with {{placeholders}} and $each (#18).
  • addedJSON (de)serialisation of documents (serde feature) (#17).
  • addedwasm-bindgen bindings and the @casoon/lightweight-pdf package sources in bindings/js (#22).
  • addedCloudflare Worker starter with measured size and timings (#23) and a browser playground (#24).
  • addedlightweight-pdf-testing: pixel-diff snapshot testing for PDFs (#21).
  • addedTableOfContents, filled from the document's headings (#10).
  • addedSoft hyphens and automatic hyphenation (hyphenation feature) (#13).
  • addedText::rich() with inline spans (#11).
  • addedDocument::theme() with named style roles (#16).
  • addedPer-cell table styling (#15), table rowspan (#14) and Table::from_rows() (#20).
  • addedPDF bookmarks from the heading hierarchy (#9) and internal links with Text::anchor() and .link_to() (#8).
  • addedAlign::Justify for text (#12).
  • addedComplete /Info metadata with creation and modification date, /Producer and a deterministic /ID (#3).
  • addedFlate compression of content streams, font programs and image samples (compress feature, on by default) (#2).
  • addedCI tracks WASM size and fails on an unannounced gzip size regression (#31).
  • changedA missing font variant is a typed error, RenderError::MissingFont, instead of a silent fallback (#5).
  • changedMissing glyphs are reported as a layout warning instead of being dropped silently (#6).
  • fixedNon-deterministic PDF output when a document used several font weights.
  • fixedA panic when rendering with an empty font registry.

0.2.1

24 August 2026

  • addedPage formats A3, A5, Letter, Legal and custom sizes, plus landscape and portrait orientation.
  • addedPDF document metadata.
  • addedHyperlinks on text.
  • addedRounded and dashed borders.
  • addedTable colspan.
  • addedItalic font keys.

0.2.0

22 August 2026

  • breakinglightweight-pdf-writer: PdfImage renamed to ImageXObject and its data field to bytes; ContentBuilder::text_rotated takes a TextRotation; PdfWriter::finish is no longer public.
  • fixedA composite glyph with an invalid glyph ID could panic on malformed fonts.
  • fixedMissing overflow check on PNG dimensions.

0.1.0

21 August 2026

  • addedFirst release: builder API over layout primitives, automatic pagination, own PDF writer and TrueType subsetter (skrifa for parsing), bundled Source Sans 3 fonts and a custom font registry (#1).