File: printfax

package info (click to toggle)
mgetty 1.2.1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,880 kB
  • sloc: ansic: 42,728; sh: 6,487; perl: 6,262; makefile: 1,457; tcl: 756; lisp: 283
file content (35 lines) | stat: -rw-r--r-- 914 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
#
# printfax <filenames>
#
# print a standard "g3" file (in high resolution).
# Needs: the pbmplus package, and the pbmtodot utility with my patches (to
#        be able to print 360x180 dpi)
#
for file
do
    # 
    # the resolution is encoded in the name of the fax: "fn*" vs. "ff*"
    #
    if expr "`basename $file`" : "fn" >/dev/null
    then
	# normal resolution
	yscale=1.84
    else
	# fine resolution
	yscale=0.92
    fi
#
# Modify this for your needs 
# (Don't forget to adapt the scaling - fax resolution is 204x196 dpi)
#
# Sample for PostScript-printers:
    g32pbm $file |pnmtops -noturn | lp -o ps
#
# Sample for a HP laserjet, using GhostScript
#    g32pbm $file |pnmtops -noturn |gs -sDEVICE=laserjet -sOutputFile="|lp" -
#
# Sample for an Epson LQ 24 pin printer
#    cat $file | g32pbm | pnmscale -xscale 1.76 -yscale $yscale | pgmtopbm | pbmtodot -360x180| lp -o stty=-opost -

done