📄 install-more
字号:
Installation of ppa-0.8.5 with S.u.S.E. Linux(Special Installation with Hp820 and paper size A4)___________________________________________________0. IntroductionThis text describes how to use the package pbm2ppa written by Tim Normanwith the S.u.S.E Linux System. This program allows the use of GDI (Winowsonly) printers with Linux. The program pbm2ppa is actually a converterbetween the two formats pbm (an output format from ghostscript) and theformat understood by the HP printers 720, 820 and 1000. So anyway we have touse ghostscript to produce pbm (or faster: pbmraw) files. To print asciifiles there is an extra step invoking enscript to convert the ascii topostscript files. I rather constructed two new printer spoolers in printcapfrom scratch then using apsfilter: one for postscript files and another forascii files. I welcome solutions in combination with the apsfilter script.The installation is quiet easy - after seven steps you should be ready toprint postscript and ascii files, but it may take some time to adjust theconstants properly, don't despair.0.1. ModificationsThis was modified on October 18, 1998 by Tim Norman to conform to the newA4 paper support in version 0.8.5.1. Installation of program package ppa-0.8.5Get the packate at http://www.rpi.edu/~normat/technical/ppa/ and compile itwith# make 820or put in your printer number (720, 820 or 1000) (see also INSTALL and READMEfile).2. To adjust the paper size to DIN A4, use the -s a4 option to pbm2ppa orchange your pbm2ppa.conf file to read "papersize a4" (see step 5).3. You can now calibrate the printer with For US size paper:# pbmtpg | pbm2ppa > /dev/lp1 ( as root )For A4 size paper:# pbmtpg -a4 | pbm2ppa -s a4 > /dev/lp1 ( as root )or you try first printing some sample files and calibrate in step 5.4. Now you can print (postscript) files with a shell script like this:Contents of print:cat $1 | gs -sDEVICE=pbmraw -q -dNOPAUSE -r600 -sOutputFile=- - | \pbm2ppa - - >/dev/lp1After changing the file modes (i.e. chmod 755 print) you are able to printa postscript file invoking the shell script print like:# print filename.psTo print ascii files just extend the script print with the use of enscript:Contents of printascii:enscript -2rj -p- $1 | \gs -sDEVICE=pbmraw -q -dNOPAUSE -r600 -sOutputFile=- - | \pbm2ppa - - >/dev/lp1Check the manpage for enscript to adjust the options to your flavour.Now you can also print ascii files with# printascii filename.ascii5. It may be possible that you have to recalibrate your printer (see 3.)Here follow the results from my calibration after printing ascii files with theshell script printascii (see 4.). The program pbm2ppa takes the arguments in thefollowing order:1. shell arguments2. config file /etc/pbm2ppa.conf3. Compiled options from default.hSo whenever you invoke pbm2ppa without arguments the program uses the optionsstored in the file /etc/pbm2ppa.conf, so I suggest to leave there a copy ofthis file.# Sample configuration file for the HP820 and DIN A4 paper size## This file will be automatically read upon startup if it's placed in# /etc/pbm2ppa.conf#version 820papersize a4xoff 0 # \ Adjust these for your printer.yoff -600 # / (see CALIBRATE)# 1/4 inch margins all around (at 600 DPI)top 50bottom 50left 50right 506. To integrate the converter into the Linux system we create two printerspooler in /etc/printcap. One to print postscript files and another to printplain ascii files.Contents of /etc/printcap:lp:\ :lp=/dev/lp1:\ :sd=/var/spool/lpd/lp:\ :lf=/var/spool/lpd/lp/log:\ :af=/var/spool/lpd/lp/acct:\ :if=/usr/local/bin/ps.if:\ :la:mx#0:\ :sh:sf:ascii:\ :lp=/dev/lp1:\ :sd=/var/spool/lpd/ascii:\ :lf=/var/spool/lpd/ascii/log:\ :af=/var/spool/lpd/ascii/acct:\ :if=/usr/local/bin/ascii.if:\ :la:mx#0:\ :sh:sf:Here follow some explanations (for more information consult the printcapmanpage). We use the lp1 device, have two spool directories/var/spool/lpd/ascii and /var/spool/lpd/lp (better you create them now) a logfile (lf) an accounting file (af), suppress form feeds (sf), suppress printingof burst page header (sh) and the maximum file size is unlimited (mx#0). Tointegrate the converter pbm2ppa into the system we use two input filters. Maybeyou have a better solution in combination with apsfilter but until then trythis way. Actually, the two input filter files are almost identical with theshell scripts print and printascii we created in step 4.File /usr/local/bin/ascii.if:#! /bin/shenscript -2rj -p- | \gs -sDEVICE=pbmraw -q -dNOPAUSE -r600 -sOutputFile=- - | \/usr/local/bin/pbm2ppa - -File /usr/local/bin/ps.if:#! /bin/shgs -sDEVICE=pbmraw -q -dNOPAUSE -r600 -sOutputFile=- - | \/usr/local/bin/pbm2ppa - -7. Place pbm2ppa in the directory /usr/local/bin. Now you are ready to printfiles with# lpr filename.psand# lpr -P ascii filename.asciilike you are used to it.Enjoy19. May 1998Michael BuehlmannBadenerstrasse 2858003 ZuerichSwitzerlandmbuehlma@stud.ee.ethz.ch
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -