Commit graph

2 commits

Author SHA1 Message Date
f9189253d7 feat: v0.3 - Image support (JPEG embedding)
Phase 3 - Images:
- JPEG parser with direct DCT passthrough (no re-encoding)
- PNG metadata extraction (full embedding pending)
- Page.image() for drawing images at position
- Page.imageFit() for auto-scaling with aspect ratio
- Pdf.addJpegImage() / addJpegImageFromFile()
- XObject generation in OutputProducer

New modules:
- src/images/mod.zig - Image module exports
- src/images/image_info.zig - ImageInfo struct
- src/images/jpeg.zig - JPEG parser
- src/images/png.zig - PNG metadata parser

New example:
- examples/image_demo.zig - Image embedding demo

Stats:
- 66 unit tests passing
- 4 working examples

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 20:00:56 +01:00
2996289953 feat: v0.2 - Complete text system (cell, multiCell, alignment)
Phase 1 - Refactoring:
- Modular architecture: fonts/, graphics/, objects/, output/
- Fixed Zig 0.15 API changes (ArrayListUnmanaged)
- Fixed memory issues in render()

Phase 2 - Text System:
- cell() with borders, fill, alignment
- cellAdvanced() with position control
- multiCell() with automatic word wrap
- ln() for line breaks
- getStringWidth() for text width calculation
- Page margins (setMargins, setCellMargin)
- Align enum (left, center, right)
- Border packed struct

New features:
- New Pdf API (cleaner than legacy Document)
- Document metadata (setTitle, setAuthor, setSubject)
- Color: RGB, CMYK, Grayscale support
- 52 unit tests passing
- New example: text_demo.zig

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 19:46:30 +01:00