Skip to content

v1.2.2 — Smart Duplex Orientation

Latest

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 ✅