ftp://ftp.metalab.unc.edu/pub/Linux/apps/serialcomm/fax/efax-0.9.tar.gz
[efax.git] / efix.1
1 .TH EFIX 1 "February 1999" ""  ""
2 .UC 1
3 .SH NAME
4 efix \- convert between fax, text, bit-map and gray-scale formats
5 .SH SYNOPSIS
6
7 .B efix
8 [
9 .I options
10 ]
11 .I file...
12
13 .SH OPTIONS
14
15 Where \fIoptions\fP are:
16
17 .TP 9
18 .B -i  \fIf\fP
19 the input image is in format \fIf\fP. Default is to automatically
20 determine the input type from its contents.
21
22 .TP 9
23 .B 
24    fax
25 fax ("Group3") 1-D coded image
26
27 .TP 9
28 .B 
29    text
30 text.  Line feeds separate lines, form feeds cause page breaks
31 and tabs are expanded assuming tabs every 8 columns.
32
33 .TP 9
34 .B 
35    pbm
36 raw PBM (portable bit map)
37
38 .TP 9
39 .B 
40    tiffg3
41 TIFF format with Group 3 (fax) compression.
42
43 .TP 9
44 .B 
45    tiffraw
46 TIFF format with no compression.
47
48 .TP 9
49 .B -o  \fIf\fP
50 write the output in format \fIf\fP.  Default is tiffg3.
51
52 .TP 9
53 .B 
54    fax
55 fax ("Group3") 1-D coded image
56
57 .TP 9
58 .B 
59    pbm
60 raw PBM
61
62 .TP 9
63 .B 
64    pgm
65 raw PGM (Portable Gray Map).  Gray-scale values are produced by
66 summing pixels in 4x4 pixel blocks.  The output file is 1/4 of
67 the size given by -p.  The resulting image has 17 discrete values
68 between 0 and 255.
69
70 .TP 9
71 .B 
72    pcl
73 HP-PCL (e.g. HP LaserJet).
74
75 .TP 9
76 .B 
77    ps
78 encapsulated Postscript (e.g. Apple Laserwriter).  The file is
79 compressed using differential coding vertically and run-length
80 coding horizontally.  There is no provision for positioning the
81 image within the page and so the image will appear at the lower
82 left corner of the page when printed.
83
84 .TP 9
85 .B 
86    tiffg3
87 TIFF format with Group 3 (fax) compression.
88
89 .TP 9
90 .B 
91    tiffraw
92 TIFF format with no compression.
93
94 .TP 9
95 .B -n \fIpat\fP
96 use the printf(3) pattern \fIpath\fP to generate the output file
97 name.  Up to three %d escapes will be replaced by the page number
98 starting with 1 (e.g. -n order.%03d will create file names
99 order.001, order.002, etc.)
100
101 .TP 9
102 .B -v \fIlvl\fP
103 print messages of type in string \fIlvl\fP.  Each
104 \fIlower-case\fP letter in \fIlvl\fP enables one type of message:
105
106 .RS 12
107 .B
108 e - 
109 errors
110 .br
111 .B
112 w - 
113 warnings
114 .br
115 .B
116 i - 
117 information messages
118 .br
119 .B
120 a - 
121 program arguments
122 .br
123 .B
124 f - 
125 file format details
126 .RE
127
128 .RS 9
129 The default is "ewi".
130 .RE
131
132 .TP 9
133 .B -f \fIfnt\fP
134 use font file \fIfnt\fP for text.  The font file for an WxH font
135 should be a bit map of an image of H rows and 256*W columns.
136 Each successive WxH cell contains the bit map for characters with
137 codes from 0 to 255.  The default is to use a built-in 8x16 font.
138
139 .TP 9
140 .B -s \fIX\fP\fRx\fP\fIY\fP
141 scale the input by a factor of X horizontally and Y vertically.
142 Scaling does not change the size of the output (use -p).  If Y is
143 not specified it is assumed to be the same as X.  Any floating
144 point value may be used for X and Y. The default is 1,1.
145
146 .TP 9
147 .B -d \fIR\fP\fR,\fP\fID\fP
148 displace the output right by R and down by D (opposite if
149 negative). See below for units.  Default is 0,0.
150
151 .TP 9
152 .B -p \fIW\fP\fRx\fP\fIH\fP
153 truncate or pad the output to generate an image of width W and
154 height H.  This does not scale the input.  See below for units.
155 The default is the size of the input image if it can be
156 determined or A4 (215x297mm) if it can't.
157
158 .TP 9
159 .B -r \fIX\fP\fRx\fP\fIY\fP
160 assume an output device resolution of X by Y dots per inch.  If Y
161 is not specified it is assumed to be the same as X.  The default
162 is the input resolution if it can be determined or the fax
163 resolution of 204.1x195.6 dpi if it can't.
164
165 .TP 9
166 .B -R \fIX\fP\fRx\fP\fIY\fP
167 assume an input device resolution of X by Y dots per inch.  If Y
168 is not specified it is assumed to be the same as X.  The default
169 is the input resolution if it can be determined or the fax
170 resolution of 204.1x195.6 dpi if it can't.
171
172 .TP 9
173 .B -l \fIn\fP
174 place n lines per page during text input. Default is 66.
175
176 .TP 9
177 .B -O \fIf\fP
178 overlay (logical OR) the image from file f into the output.  Use
179 '-' for standard input (-O-).  Default is no overlay file.
180
181 .TP 9
182 .B -M
183 ignore all other options and copy the standard input to the
184 standard output while applying base64 (MIME) encoding as
185 specified by RFC 1521.
186
187
188 .SH FILES
189
190 If no -n options are given, output is written to the standard
191 output.
192
193 .SH UNITS
194
195 The units of the W, H, R, and D values above are in inches by
196 default.  Any floating point value may be used.  Units of inches,
197 centimetres, millimetres or points (72 per inch) can be used
198 instead by appending one of the strings `in', `cm', `mm', or `pt'
199 to the argument (e.g. -d2,4cm).
200
201 .SH CUT AND PASTE
202
203 The -d and -p options allow efix to cut out images from received
204 faxes for use in other faxes or documents.  The -d option specifies
205 the top left portion of the desired image and the -p option gives
206 the size of the cut image.  For example, the command
207 .RS
208 .nf
209 .ft CW
210         efix -d-5,-8 -p2,1 sample.001 >sig.001
211 .ft P
212 .fi
213 .RE
214 would cut out part of the input with its top left corner 5 inches
215 from the left edge and 8 inches from top of the input image.  The
216 output image would be 2 inches wide and 1 inch high.
217
218 The -O option allows efix to superimpose two or more images.  The
219 overlay image must be in fax format and cannot be scaled,
220 truncated or shifted. However, multiple efix commands may be
221 pipelined to transform images before combining them.  For
222 example, the command
223 .RS
224 .nf
225 .ft CW
226         efix -d4,8 signature | \\
227         efix -O- letterhead | \\
228         efix -O- letter.002 >letter.002.new
229 .ft P
230 .fi
231 .RE
232 will shift the image in the file signature down 8 inches and
233 right 4 inches and combine (overlay) it with the images in the
234 files letterhead and letter.002.
235
236 .SH REFERENCES
237
238 Gunter Born, "The File Formats Handbook", International Thompson
239 Computer Press, 1995.
240
241 .SH COPYRIGHT
242
243 efix is copyright 1994 -- 1999 by Ed Casas.  It may be used,
244 copied and modified under the terms of the GNU Public License.
245
246 .SH DISCLAIMER
247
248 Although \fBefix\fP has been tested it may have errors that will
249 prevent it from working correctly on your system.  Some of these
250 errors may cause serious problems including loss of data.
251
252 .SH SEE ALSO
253
254 .BR efax(1),
255 .BR ghostscript(1),
256 .BR pbm(5), 
257 .BR pgm(5).
258
259 .SH  BUGS
260
261 Only reads two types of TIFF compression formats.
262
263 Does not write multi-page TIFF files (a feature).
264