Skip to content

Releases: AndyCappDev/postforge

v0.9.5 — PostScript Level 3

25 Feb 04:47

Choose a tag to compare

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 UseCIEColor is 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 ColorModel in the color conversion pipeline. All device configuration files updated.
  • Trapping operatorssettrapparams, currenttrapparams, settrapzone accepted without error (no-ops for screen/file devices).
  • Level 3 user/system parametersIdiomRecognition, AccurateScreens, HalftoneMode, LicenseID.
  • Level 3 resource categoriesIdiomSet, 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

23 Feb 20:16

Choose a tag to compare

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 %%Orientation first, 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

23 Feb 07:35

Choose a tag to compare

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

21 Feb 13:34

Choose a tag to compare

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 .tif per page (same as PNG behavior)
  • Multi-page mode: pf -d tiff --multipage-tiff document.ps — all pages combined into a single .tif file
  • 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/.tiff extensions
  • DPI metadata and LZW compression included by default

PostForge v0.9.1

19 Feb 15:37

Choose a tag to compare

What's New

Executive Debugging Support

  • Live Qt painting during executive: Calling executive from 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 / cont command: Exit the interactive prompt and resume the calling file, unlike quit which terminates the entire job
  • .setinteractivepaint internal 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/quit commands

PostForge v0.9.0

17 Feb 22:35

Choose a tag to compare

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.