Releases: AndyCappDev/postforge
v0.9.5 — PostScript Level 3
PostScript Level 3 Compliance
PostForge now declares LanguageLevel 3. This release implements all remaining Level 3 features needed for full compliance.
New Features
- UseCIEColor — Device color spaces (DeviceGray/RGB/CMYK) are remapped through CIE-based substitute color spaces when
UseCIEColoris true in the page device (PLRM 6.2.5). Default resources provided: CIEBasedA (Gray), CIEBasedABC/sRGB (RGB), DeviceCMYK pass-through. - ProcessColorModel — PLRM-standard page device parameter wired as fallback for
ColorModelin the color conversion pipeline. All device configuration files updated. - Trapping operators —
settrapparams,currenttrapparams,settrapzoneaccepted without error (no-ops for screen/file devices). - Level 3 user/system parameters —
IdiomRecognition,AccurateScreens,HalftoneMode,LicenseID. - Level 3 resource categories —
IdiomSet,ControlLanguage,Localization,PDL,HWOptions.
Documentation
- Compliance assessment expanded to cover Level 3 features
- Architecture overview updated with UseCIEColor and ProcessColorModel details
- Gap analysis updated with current status
v0.9.4 — Native PDF Writer & Qt Auto-Rotation
Native PDF Writer (removes pypdf dependency)
The PDF device now uses a lightweight native PDF object model and writer, replacing the pypdf library entirely. This is the headline change for v0.9.4:
- Eliminates pypdf dependency — one fewer external dependency to install and maintain
- Fixes "unhashable type: IndirectObject" crash on large documents that previously failed with pypdf
- Removes the round-trip hack that was needed to work around a poppler text-selection bug
- Fixes PdfName serialization — hex-escapes PDF delimiter characters in glyph names, fixing garbled Type 3 font text in PDF viewers
Qt Auto-Rotation for Landscape Pages
The Qt interactive display now automatically detects and un-rotates landscape content rendered on portrait pages, matching the PDF device's existing behavior:
- Shared orientation detection module used by both PDF and Qt devices
- Two-tier detection: DSC
%%Orientationfirst, CTM heuristic fallback - DPI auto-calculation accounts for post-rotation display height
- Window sizing uses wider horizontal caps (85%) for landscape content
v0.9.3
What's New
Native PDF Device
The PDF output device (-d pdf) has been completely rewritten. Instead of rendering through Cairo and post-processing with font injection, PostForge now generates PDF content streams directly from the PostScript display list.
Key improvements:
- Color space preservation — CMYK, Gray, and RGB color spaces are preserved in the PDF output instead of being forced to RGB
- Direct PDF generation — Content streams are built directly from the display list, producing cleaner and more efficient PDFs
- Type 3 font support — Type 3 PostScript fonts are embedded as PDF Type 3 fonts with CharProcs, shared across pages, with ToUnicode CMaps for text searchability
- Improved text handling — Text batching with TJ arrays and kern values for accurate character positioning and proper text selection
- Font sharing — FontFile and FontDescriptor objects are shared across re-encoded Type 1 fonts, reducing file size
- Image optimization — DCT compression for color images, inline images for Type 3 glyphs, and support for Type 3 stencil masks and Type 4 color key masks
- Shading support — Function-based, axial, radial, and mesh shadings rendered directly as PDF shading objects
- Higher default resolution — 600 DPI default (up from 300) for improved rendering precision
The Cairo-based PDF device has been removed. The -d pdf flag now uses the native device exclusively.
v0.9.2
What's New
TIFF Output Device
New output device that renders PostScript to TIFF image files.
- Single-page mode:
pf -d tiff document.ps— one.tifper page (same as PNG behavior) - Multi-page mode:
pf -d tiff --multipage-tiff document.ps— all pages combined into a single.tiffile - CMYK output:
pf -d tiff --cmyk document.ps— RGB-to-CMYK conversion using the system ICC profile, with the profile embedded in the TIFF for downstream color management - Extension inference:
pf -o output.tif document.ps— auto-selects the TIFF device from.tif/.tiffextensions - DPI metadata and LZW compression included by default
PostForge v0.9.1
What's New
Executive Debugging Support
- Live Qt painting during executive: Calling
executivefrom a PostScript file now opens the Qt display window with live updates on every paint operation, making it a powerful debugging tool for visualizing graphics state mid-execution continue/contcommand: Exit the interactive prompt and resume the calling file, unlikequitwhich terminates the entire job.setinteractivepaintinternal operator: Toggles live paint callbacks precisely on executive entry/exit, so batch rendering performance is unaffected
Qt Display Improvements
- Qt event loop now auto-closes the window when showpage was never called (e.g., after an executive-only session)
- Restored default SIGINT handling in the Qt event loop so Ctrl+C works reliably
Documentation
- Added update instructions to README and User Guide
- Documented executive debugging workflow with
continue/quitcommands
PostForge v0.9.0
PostForge v0.9.0 — Initial Release
A PostScript Level 2 interpreter written in Python with Level 3 enhancements.
Features
- Full PostScript Level 2 compliance with selected Level 3 features
- Multiple output formats: PNG, PDF, SVG, and interactive Qt display
- PDF font embedding: Type 1 font reconstruction and CID/TrueType embedding
- Color management: ICC profile support for CMYK-to-RGB conversion
- Cairo-based rendering: High-quality anti-aliased graphics output
- Optional Cython acceleration: ~15-40% speedup for the core execution loop
Supported Platforms
- Linux (Debian/Ubuntu, Fedora/RHEL, Arch, openSUSE)
- macOS (via Homebrew)
- Windows
Requirements
- Python 3.13+
- Cairo graphics library
See the README for installation instructions.