Re: xerox settings for DINA4

Joachim Woll (woll@physik.uni-kassel.de)
Fri, 23 Jan 1998 11:11:23 +0100

This is a multi-part message in MIME format.
--------------A665F054BDA27BDF026D8E1B
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Henning Sauer wrote:

> Sorry, but I didn't find anything that seemed to be useful to solve this
> problem in the pnmtops manpage.
>

Yesterday I played a little with the xerox-script.
The result attached to this mail works quite well for me. Maybe
it is a help for you.
It is written for my HP-Laserjet-Printer. To enable Postscript,
please read the file.

J.

--------------A665F054BDA27BDF026D8E1B
Content-Type: text/plain; charset=us-ascii; name="xerox"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="xerox"

#!/bin/sh
#
# This is a xerox script for Laserjet Printer.
# To get use of Postscript change the Printercommand and enable the
# command at the end of this File.
#
# ~/src/sane-0.69/tools/xerox
# changed for own purpose, J.Woll 22.01.1998
#
# Scannner Device/Resolution/Gamma-Table/Dev.-Spec.opts
# The Gamma-Table written here is a first guess. It encreases the
# brightness and contrast. Change it if needed
DEV=mustek:/dev/scanner
RES=300
GAMMA=[0]0-[39]0,[40]0-[180]255,[181]255-[255]255
SOPTS="--backtrack=yes" # needed for my Mustek 12000SP
#
# Printer Command/Resolution
LPR="lpr -Praw" # for Postscript Printer use LPR="lpr"
PRES=${RES} # change this if other Res. is desired
#
# Papersize in inch
# A4:
WIDTH=8.27
HEIGHT=11.69
# letter:
#WIDTH=8
#HEIGHT=10
#
#
# Border in inch (Printable Size Limitation)
#
XMAR=0.25
YMAR=0.25
#
# ***********************************************************
#
XMAX=`bc <<_EOF_
${WIDTH}-2*${XMAR}
_EOF_`
YMAX=`bc <<_EOF_
${HEIGHT}-2*${YMAR}
_EOF_`
#
SCALE=`bc << _EOF_
72/${RES}
_EOF_`
#
# further scanimage options (Missing in Sane-Documentation?):
# x : width of scan
# y : height of scan
# l : offset horizontal
# t : offset vertical
#
scanimage -d $DEV -x ${XMAX}\" -y ${YMAX}\" -l ${XMAR}\" -t ${YMAR}\" \
--resolution ${RES} --mode Gray --custom-gamma=yes \
--gamma-table $GAMMA $SOPTS | \
pgmtopbm | pbmtolj -resolution ${PRES} \
| $LPR
#
# For Postscript-Printer delete the previos Lines and uncomment the following
#
# scanimage -d $DEV -x ${XMAX}\" -y ${YMAX}\" -l ${XMAR}\" -t ${YMAR}\" \
# --resolution ${RES} --mode Gray --custom-gamma=yes \
# --gamma-table $GAMMA $SOPTS | \
# pnmtops -center -rle -scale ${SCALE} -dpi ${PRES} \
# -width ${WIDTH} -height ${HEIGHT} | $LPR
#

--------------A665F054BDA27BDF026D8E1B--

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com