2001年11月27日
▽[memorandum] PDF Writer
Samba + GS で簡易 PDF 出力用の仮想 Printer を作る.# mkdir /home/samba/bin/ # mkdir /home/samba/pdfwork/ # mkdir /home/samba/pdfoutput/ # chmod 777 /home/samba/pdfwork/ # chmod 777 /home/samba/pdfoutout/
# vi /etc/smb.conf --------------------------------- [pdf writer] printable = yes comment = PDF Writer print command = /home/samba/bin/pdfwrite %s & guest ok = yes path = /home/samba/pdfwork [pdfoutput] comment = PDF Output path = /home/samba/pdfoutput guest ok = yes read only = no writable = yes --------------------------------- # service smb restart
# vi /home/samba/bin/pdfwrite
---------------------------------
#!/bin/sh
# usage: pdfwrite [ps filename]
outdir=/home/samba/pdfoutput
workdir=/home/samba/pdfwork
psname=$1
pdfname=${workdir}/$psname.pdf
/usr/bin/ps2pdf $psname $pdfname
mv $pdfname $outdir
---------------------------------
# chmod +x /home/samba/bin/pdfwrite
普通にプリンタを追加する.ドライバが見つからないといわれる場合は,適当 なものを選ぶ(Canon LBP-A404IIPS). 単に GS を通じて変換しているだけなので,Font は汚い.まあ飽く迄簡易な んで.
Posted by Rust Stnard at 00:00





