Commit Graph

3 Commits (6528f64594d6021606c9088d6693184211b4a9a1)

Author SHA1 Message Date
Amir Alexander Abdelbaki c1d5c7d9cb add roll printer support via PRINTER_MAX_LINES=0
A continuous-feed printer has no fixed page length, so photobooth.py
now sizes captures to the carriage width (PRINTER_MAX_COLS) and lets
height follow the image's own aspect ratio instead of cropping to a
row count, and txt2printr.sh always feeds the paper out at the end of
a print since there's no page to auto-advance past.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 12:21:29 +02:00
Amir Alexander Abdelbaki a7d5b9d1bc fix: use measured page capacity instead of derived CPI/LPI geometry
Real-world testing (pagetest.sh) showed the printer's actual per-page
line/column capacity didn't match what the A4-geometry math predicted,
and the redundant blank second page was traced to the printer
auto-advancing to a new page once content hits the bottom margin,
with our own unconditional trailing form-feed then ejecting that
already-started blank page on top of it.

Replace PRINTER_CPI/PRINTER_LPI with directly-measured
PRINTER_MAX_LINES/PRINTER_MAX_COLS in printer.conf (read via
pagetest.sh), and have txt2printr.sh skip the trailing form-feed
whenever the print job already reaches that line capacity.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 09:59:06 +02:00
Amir Alexander Abdelbaki 07cf695840 feat: add PRINTER_A4 landscape option for A4 printers
Dot-matrix printers have no hardware page-rotation, so when PRINTER_A4
is enabled in the new printer.conf, txt2printr.sh rotates the ascii art
90 degrees in software before sending it, and photobooth.py caps its
live-preview viewfinder to an A4-landscape character grid (sized from
configurable PRINTER_CPI/PRINTER_LPI) instead of just filling the
terminal, so the preview matches what actually gets printed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 09:27:22 +02:00