Skip to content

Releases: odrobnik/printer-skill

v1.2.2 — Smart Duplex Orientation

Choose a tag to compare

@odrobnik odrobnik released this 17 Feb 07:36

Smart Duplex: Auto-detect document orientation for correct binding

What changed

  • Duplex binding now auto-detects document orientation from the PDF's MediaBox instead of relying on the printer's default paper size
  • Portrait documents → two-sided-long-edge (book-style flip left/right)
  • Landscape documents → two-sided-short-edge (book-style flip left/right)
  • Falls back to long-edge (portrait) if orientation detection fails
  • Zero new dependencies — reads first 8KB of the PDF with a lightweight regex

What it fixes

  • Previously hardcoded two-sided-short-edge caused portrait duplex prints to have the back page upside-down — not the expected book-style behavior

Tested on

  • HP Color LaserJet Pro M478f — both portrait and landscape A4 duplex confirmed correct ✅

v1.1.1 — Option passthrough & better docs

Choose a tag to compare

@odrobnik odrobnik released this 16 Feb 13:40
  • -o KEY=VALUE flag to pass any CUPS option (tray, quality, duplex, color mode, media type)
  • README rewritten: plain python3 examples (no uv run), resolution/media/margins documentation, tray selection, common options table, info --json output example
  • SKILL.md: document -o with examples

v1.1.0 — Smarter symlink handling

Choose a tag to compare

@odrobnik odrobnik released this 16 Feb 13:35

Replaces blanket symlink rejection with path containment:

  • Symlinks are now followed and the resolved path is checked against allowed roots (workspace, /tmp)
  • Symlinks within the workspace or /tmp work normally
  • Symlinks pointing outside (e.g. ln -s ~/.ssh/id_rsa secrets.pdf) are blocked
  • File extension validated on the resolved (real) file, not just the link name

v1.0.3 — Best practices compliance

Choose a tag to compare

@odrobnik odrobnik released this 16 Feb 13:33

Aligns with OpenClaw Skill Best Practices:

  • stdout/stderr line buffering for real-time agent output
  • [print] status prefixes on output lines
  • YAML block style for dependency declarations
  • Full .gitignore/.clawhubignore per template
  • README Documentation section with ClawHub link
  • Description includes trigger language ('Use when...')

v1.0.2 — Block symlink information disclosure

Choose a tag to compare

@odrobnik odrobnik released this 16 Feb 13:31

Fixes symlink-based information disclosure vulnerability.

An attacker could create a symlink (e.g. ln -s ~/.ssh/id_rsa secrets.pdf) and instruct the agent to print it, leaking sensitive files to physical printer output.

Fix: _validate_file_path() now rejects symlinks entirely. File extension validation runs on both the literal path and the resolved target.

v1.0.1 — Security hardening

Choose a tag to compare

@odrobnik odrobnik released this 16 Feb 13:28
  • Validate file paths: restrict to printable types only
  • Validate printer names: prevent injection via crafted names
  • Prevent path traversal in PPD file lookups

v1.0.0

Choose a tag to compare

@odrobnik odrobnik released this 16 Feb 13:22

Initial release

  • Print PDFs and images to any CUPS printer
  • PPD-aware: reads paper size, margins, resolution, duplex at runtime
  • Commands: list, print, info, options
  • All commands support --json for machine-readable output
  • Image-to-PDF conversion at native printer DPI
  • Auto-detects system default printer