Repository navigation
Releases: odrobnik/printer-skill
Releases · odrobnik/printer-skill
Release list
v1.2.2 — Smart Duplex Orientation
Smart Duplex: Auto-detect document orientation for correct binding
What changed
- Duplex binding now auto-detects document orientation from the PDF's
MediaBoxinstead 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-edgecaused 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
-o KEY=VALUEflag to pass any CUPS option (tray, quality, duplex, color mode, media type)- README rewritten: plain
python3examples (nouv run), resolution/media/margins documentation, tray selection, common options table,info --jsonoutput example - SKILL.md: document
-owith examples
v1.1.0 — Smarter symlink handling
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
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
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
- 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
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