2011年7月5日 星期二

Linux printer server setup

Package need:
1: pdfdistiller  PDF engine
2: Imaging  image engine
3: pkpgcounter  page counter
4: tea4cup  backend daemon
System folder
1: /usr/share/cups/model  printer driver default path
2: /etc/cups  cups and tea4cups configuration file path
3: /etc/cups/ppd  printer driver for each printer. Naming rule is same as printer name
4: /usr/lib/cups/backend  backend folder. Printer interface definition
Configuration file
1: /etc/xinetd.d/cups-lpd  lpd printer
2: /etc/cups/cupsd.conf  cupsd configuration file
3: /etc/cups/tea4cups.conf  tea4cups configuration file
4: /etc/cups/mime.convs  mime application and filter mapping
5: /etc/cups/mime.types  mine type definition
Daemon
1: /etc/init.d/cups
2: /etc/init.d/xinetd
Setup
cp pdfdistiller /usr/lib/cups/backend;chmod +x pdfdistiller
cp tea4cups /usr/lib/cups/backend;chown root:root tea4cups;chmod 700 tea4cups;
install Imaging and pkpgcounter  python setup.py install
vi /etc/cups/tea4cups.conf
under the global segment
prehook_keep : ps2pdf $TEADATAFILE /tmp/print/log/audit/$TEAPRINTERNAME.$TEAJOBID-$TEACLIENTHOST.$TEAUSERNAME.pdf

prehook_log : echo `date +%Y/%m/%d\ %H:%M` $TEAPRINTERNAME $TEAJOBID $TEACLIENTHOST $TEAUSERNAME `pkpgcounter $TEADATAFILE`\"$TEATITLE\" >> /var/log/printaccounting.log
Printer installation:
Linux: lpadmin –p queue name –m dirver –v lpd://printer_server/queue_name-E
Unix: lpadmin -p kido -v /dev/null -m netstandard -o protocol=bsd -o dest=10.88.229.75:text -o timeout=5 -o nobanner -D "Plotter in copy room"

Printer Server: lpadmin -p ljet1 -m PrintAudit.ppd -v tea4cups:lpd://10.88.228.9/LPD -E -L "Copy Room" -D "HP Laser Printer"

沒有留言: