[sdiy] Original ARP Service Manuals

Rainer Buchty rainer at buchty.net
Mon Jan 12 12:51:26 CET 2009


On Mon, 12 Jan 2009, Karl Ekdahl wrote:

> Any good ideas on how to do this effectively? Just doing this 8-page 
> manual took me ~1-2 hours using Gimp for scanning/rotating/cropping 
> and then Open Office to make it into a multi-page PDF. I'm a windows 
> user :-(

Well... There you name it ;)

For a bigger scan job, I wrote a small script, which translates our 
institute's scanner output format (JBIG) into something more common -- 
with scaling, page rotation, margin cutting, and final conversion to PDF 
via JPG.

If you have Cygwin installed (plus pnmutils and ImageMagick, the jbigkit 
probably isn't required if your scanner does not also output this 
format), the following might also work for you:

#!/bin/bash
i=$1 ; 
while [ $i -le $2 ] ; 
	do echo $i ; 
	jbgtopbm $i.jbg | \
	pnmscale 0.25 | \
	pnmcut -left $3 -right $4 -top $5 -bottom $6 | \
	pnmscale 0.25 | \
	pnmflip -r90 | \
	pnmtojpeg --greyscale --smooth 10 | \ 
	convert - $i.pdf ; 
	let i=$i+1 ; 
done ;

Final assembly of individual PDF files into a single document can be 
easily done with pdftk.

HTH,
	Rainer





More information about the Synth-diy mailing list