[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Scanner -> printer problems.



 I've been trying for a while to get my scanner and printer to cooperate
and act like a copy machine. I've got a small script that I've hacked in
various ways, but no matter what I try, I can't get the scale quite right.

 I've got a Mustek scanner that I use with SANE (at 300dpi, lineart mode)
and an HP DeskJet 600 printer (used at 300dpi again). SANE spits out a
PPM-format file.

 I've tried using "pnmtops" (from the netpbm package) and "convert" (from
ImageMagick) to produce a postscript file that then goes through
magicfilter. I *thought* I read the man pages appropriately, but the image
on the paper is not *quite* the same size as the original.

 If I hold the original and the copy up to a light and look through them,
I can see that the output is a bit bigger than the input. It's not really
noticeable just looking at the output, but it annoys me. I mean, 300dpi
input should translate to 300dpi output, no?

 Anyway here's the 'xerox' script I've tried:

-----------------------------------------------
#!/bin/sh
# Device to scan from
DEV=mustek:/dev/scanner
# 300 dpi
RES=300
# Next 4 measurement are in millimeters
LEFT=5
TOP=5
WIDTH=205
HEIGHT=255
# From the pnmtops man page
SCALE=.25
# The actual command: scan -> pnmtops -> lpr
scanimage -d ${DEV} -l ${LEFT} -t ${TOP} -x ${WIDTH} -y ${HEIGHT} \
        --resolution ${RES} | \
        pnmtops -dpi 300 -center -rle -scale ${SCALE} | \
        lpr
-----------------------------------------------

 I have also tried things like:

convert -density 300x300 /tmp/xerox.ppm /tmp/xerox.ps
lpr /tmp/xerox.ps

 Does anyone have any suggestions or ideas on what I might try? I know
that I'm not going to get a perfect copy, but over the course of a full
page the difference in scaling leads to an offset of a full line of text.
I'm going to try xeroxing a ruler so I can measure the exact divergence.

 Sincerely,

 Ray Ingles       (248) 377-7735    ray.ingles@fanucrobotics.com

 "Every question has a simple, easy-to-understand wrong answer."
                        -H. L. Mencken


Reply to: