PaperForge v0.2.0
PaperForge v0.2.0
PaperForge v0.2.0 is a major expansion of the pure Elixir PDF generation engine.
This release adds richer text layout, compressed streams, configurable PDF versions, multiple standard fonts, margins, coordinate systems, JPEG and PNG images, transparency, resource deduplication, and stronger PDF integrity testing.
Highlights
Text and fonts
- Support for all 14 standard PDF Type 1 fonts
- Automatic font registration and reuse
- Text-width measurement
- Left, center, and right alignment
- Automatic word wrapping
- Explicit line breaks
- Configurable line height
- Multiline text boxes
- Text-box overflow information
Pages and layout
- Top-left and bottom-left coordinate systems
- Uniform and per-side margins
- Content-boundary helpers
- Portrait and landscape orientations
- Configurable PDF versions
Images
- JPEG support:
- Grayscale
- RGB
- CMYK
- PNG support:
- Grayscale
- RGB
- Grayscale with alpha
- RGBA
- PNG transparency through PDF soft masks
- Automatic aspect-ratio preservation
- Image loading from file paths or binaries
- SHA-256 image deduplication
- Reuse of image and
/SMaskresources - Optimized PNG handling for large images
PDF internals
- Flate-compressed page streams
- Optional uncompressed output
- Centralized page compilation
- Centralized page resource management
- Unicode metadata through UTF-16BE
- Cross-reference offset validation
- Structural end-to-end PDF tests
Validation
- 94 tests passing
- Compilation passes with
--warnings-as-errors - Documentation builds successfully
- Hex package builds successfully
Current limitation
Visible text still uses standard PDF font encodings. Embedded TrueType fonts and full Unicode visible text are planned for v0.3.0.