📄 ps-to-fax.fpi
字号:
#!/bin/sh## convert ps to the format required by the printer on this queue## if the printer is a PostScript printer, just cat it through# if the printer uses ghostscript, we'll run it now# if the printer is neither, we die (with good message to someone)### read in PostScript configuration settings#source ${SPOOLDIR}/postscript.cfg## see if we should reverse order## support will be added for this in the future# psorder needed and is part of netatalk, which we dont currently ship#if [ "$PAPERSIZE" = "letter" ]; then mpage_paper="Letter"elif [ "$PAPERSIZE" = "a4" ]; then mpage_paper="A4"elif [ "$PAPERSIZE" = "legal" ]; then mpage_paper="Legal"else mpage_paper="Letter"fi## weird case - some PS doesnt get hbin/ksendfaxandled by mpage well# so we allow nup=1 to just cat PS to printer w/o mpage interferring#if [ "$NUP" = "1" ]; then border="-o" mpage_cmd="cat -"else border="" mpage_cmd="mpage -b$mpage_paper $border -$NUP -m${RTLFTMAR}lr -m${TOPBOTMAR}tb"fiexport KDEDIR=/opt/kdeexport PATH=$KDEDIR/bin:$PATHexport FAXFILE=/tmp/fax_$$.pseval $mpage_cmd >$FAXFILEklaunch ksendfax -oneshot $FAXFILE#faxrunq#rm -f $FAXFILEexit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -