#pdf #typesetting #layout #document

no-std oxipdf-ir

Intermediate representation types for the oxipdf PDF engine

6 releases

Uses new Rust 2024

0.1.0 Apr 11, 2026

#2894 in Text processing

Download history 32/week @ 2026-04-11 26/week @ 2026-04-18 17/week @ 2026-04-25 19/week @ 2026-05-02

94 downloads per month
Used in 9 crates (7 directly)

MIT/Apache

190KB
4K SLoC

oxipdf-ir

Intermediate representation types for the oxipdf PDF engine.

This crate defines the StyledTree IR that serves as the input contract for the oxipdf rendering pipeline. Consumers construct a StyledTree from their domain AST and submit it to the engine for layout and emission.

What's Inside

  • StyledTree and StyledTreeBuilder — the validated IR tree
  • Node, NodeId, ContentVariant — node types and content
  • ResolvedStyle — fully resolved styles (no inheritance, no cascade)
  • Pt, Dimension, LengthPercentage — canonical unit types
  • IrVersion — schema versioning with forward-compatibility rules
  • SemanticRole — semantic markup for theming

IR Schema Versioning

The IR schema is versioned via IrVersion. Same major version is forward-compatible (older tree, newer engine). Different major versions are incompatible.

License

Licensed under either of Apache License, Version 2.0 or MIT License at your option.

Dependencies

~140–530KB
~12K SLoC