Commit Graph

5 Commits

Author SHA1 Message Date
Warren d1e92b32fb Add cover page support with Chinese font rendering
Features:
- Cover page generation using Python/Pillow with Apple PingFang font
- CLI commands: cover-create, job-cover for cover page management
- API endpoints: PUT /api/fax/jobs/{id}/cover for cover modification
- Send fax with cover page: --to, --from, --subject, --note options
- Multi-page TIFF parsing for PDF conversion (fix: all pages now sent)
- Preview HTML generation with pan/zoom support
- OCR verification for cover page content
- Class 2 receive support for incoming faxes

Fixes:
- Modem initialization before Class 2 mode entry
- Dial timeout handling with retry logic
- Multi-page fax transmission between pages
- Chinese character rendering in cover pages (Apple native fonts)
2026-07-02 18:43:16 +08:00
Warren b102917644 Implement T.4 MH (Modified Huffman) encoder
- encoder/mh.rs: Full T.4 Group 3 MH encoding implementation
- Uses ITU-T T.4 standard Huffman tables for white/black runs
- Adds EOL codes and RTC (6 EOLs) at document end
- Class2Send now encodes pixels to MH before transmission
- CLI convert command shows MH encoded size

Test result: 467KB raw pixels → 14.6KB MH encoded (~32:1 compression)
2026-07-01 18:12:57 +08:00
Warren 4b6c89bee0 Add Class 2 fax protocol support
- class2/commands.rs: EIA/TIA-592 Class 2 AT command definitions
- class2/send.rs: Class2Send implementation for simpler fax sending
- CLI: Add --class option for send command (1 or 2)
- CLI: Add --class2 flag for test command
- Tested with Conexant V90 modem - all Class 2 commands working
2026-07-01 18:07:14 +08:00
Warren bf1ca90a9c Add PDF to fax conversion support
- pdf.rs: Ghostscript-based PDF to TIFF-F conversion
- tiff_to_fax_document: Parse TIFF and convert to 1-bit fax format
- CLI: Add 'convert' subcommand for dry testing
- CLI: Add resolution option for send command
- Test files for PDF/TIFF conversion validation
2026-07-01 17:17:49 +08:00
Warren 13438289fe Initial commit: telfax - Rust Fax Server
- Modem driver (serialport) with AT command interface
- Class 1 fax protocol (T.30 session, HDLC framing)
- T.4/T.6 image codec (fax crate integration)
- Document conversion (image to fax, TIFF-F output)
- REST API (axum) for fax job management
- SQLite/InMemory job queue
- CLI interface (detect/serve/send/test)
- Integration tests passing
2026-07-01 09:06:41 +08:00