Advertisements

Archive for July 6th, 2014

Tweaked Crossword Scanning

In what’s surely a change intended to better meet the needs of their customers, the newspaper changed the crossword layout just a little teeny bit, so my previous script needed a tweak:

#!/bin/bash
echo Scanning...
scanimage --mode Gray --opt_emulategray=yes --resolution 300 -l 5 -t 0 -x 105 -y 195 --format=pnm > /tmp/scan.pnm
echo Converting...
convert /tmp/scan.pnm -level 45%,60% -resize 2400x3150 +repage -unsharp 0 /tmp/trim.png
convert -density 300 -size 2550x3300 canvas:white /tmp/trim.png -gravity center -composite /tmp/page.pdf
echo Printing...
lp -n 2 /tmp/page.pdf
echo Done!

It now spits out two large-print copies, to better meet their actual needs, at least for two of their customers.

Advertisements

,

5 Comments