| 1 |
.\" Copyright (c) 2000 |
| 2 |
.\" Andreas Klemm <[email protected]>. All rights reserved. |
| 3 |
.\" |
| 4 |
.\" $ApsCVS: src/apsfilter/man/apsfilter.1.in,v 1.23.2.11 2002/11/10 13:02:40 andreas Exp $ |
| 5 |
.\" |
| 6 |
.Dd May 19, 2001 |
| 7 |
.Dt APSFILTER 1 |
| 8 |
.Os |
| 9 |
.Sh NAME |
| 10 |
.Nm apsfilter |
| 11 |
.Nd magic print filter with auto file type recognition |
| 12 |
.Sh SYNOPSIS |
| 13 |
.Nm lpr |
| 14 |
.Op Fl P Ns Ar printer |
| 15 |
.Op Fl C Ar option1:...:optionN |
| 16 |
.Op Ar file ... |
| 17 |
(lpd style) |
| 18 |
.Nm lpr |
| 19 |
.Op Fl P Ns Ar printer |
| 20 |
.Op Fl Z Ar option1:...:optionN |
| 21 |
.Op Ar file ... |
| 22 |
(LPRng style) |
| 23 |
.Nm lp |
| 24 |
.Op Fl d Ar printer |
| 25 |
.Op Fl o Ar option1:...:optionN |
| 26 |
.Op Ar file ... |
| 27 |
(Solaris style) |
| 28 |
.Sh DESCRIPTION |
| 29 |
.Nm Apsfilter |
| 30 |
is a magic print filter which allows you to print different |
| 31 |
document types |
| 32 |
.Dq automagically |
| 33 |
without having to convert them manually |
| 34 |
into a document format which is understood by your printer hardware. |
| 35 |
.Pp |
| 36 |
.Nm Apsfilter |
| 37 |
uses third-party software to convert every supported |
| 38 |
file type into PostScript (PS) first. If you have a real PS printer, the |
| 39 |
data stream is then sent directly to the PS printer, otherwise it is |
| 40 |
piped through the famous PS interpreter |
| 41 |
.Xr gs 1 |
| 42 |
which supports a wide range of output devices. |
| 43 |
.Pp |
| 44 |
Thus the question whether a particular printer is supported by |
| 45 |
.Nm |
| 46 |
is actually the question of it either understanding PS directly, or |
| 47 |
being supported by |
| 48 |
.Xr gs 1 |
| 49 |
in some way (possibly using some emulation of another printer's |
| 50 |
software interface, like Epson's ESC/P2 or HP's PCL). |
| 51 |
.Pp |
| 52 |
Another important thing to remember is that the required driver support has |
| 53 |
to be present in the installed |
| 54 |
.Xr gs 1 |
| 55 |
binary. |
| 56 |
.Ic gs -h |
| 57 |
lists (among others) which drivers are currently compiled in. SETUP warns |
| 58 |
when a selected driver is missing and guides in choosing another driver. |
| 59 |
.Pp |
| 60 |
The |
| 61 |
.Em FreeBSD ports collection |
| 62 |
offers an easy and comfortable framework for FreeBSD users |
| 63 |
to configure and install apsfilter, |
| 64 |
.Xr gs 1 , |
| 65 |
gs third-party driver and filter programs for their personal needs. |
| 66 |
.Pp |
| 67 |
The |
| 68 |
.Nm |
| 69 |
script is designed to avoid temporary files as much as |
| 70 |
possible. So it is very efficient in use and doesn't fill up |
| 71 |
filesystems even when printing large printjobs in high resolution |
| 72 |
and best print quality. |
| 73 |
.Pp |
| 74 |
.Nm Apsfilter |
| 75 |
offers a wide range of customization options through config files and |
| 76 |
.Xr lpr 1 |
| 77 |
command line options, see below. |
| 78 |
.Ss Advantages over other magic filters |
| 79 |
.Nm Apsfilter |
| 80 |
and its SETUP is completely written in a script language (see |
| 81 |
.Xr sh 1 ). |
| 82 |
So it is easy to understand and modify even for users and admins who |
| 83 |
are quite new to the Unix business. |
| 84 |
.Pp |
| 85 |
.Nm Apsfilter |
| 86 |
is highly customizable and its developement since 1994 has shown that it |
| 87 |
scales very well with the still growing demand of additional features. |
| 88 |
.Ss Supported printers |
| 89 |
Apsfilter supports locally connected serial, parallel and USB printers. |
| 90 |
.Pp |
| 91 |
Remote printing cababilities: Unix remote printing (lpd protocol), |
| 92 |
printing to an AppleTalk remote printer via |
| 93 |
.Xr pap 1 |
| 94 |
as well as Windows remote printing via SAMBAs |
| 95 |
.Xr smbclient 1 |
| 96 |
on Windows 95/98/NT/2000 printer as guest user or using a real password |
| 97 |
protected Windows account. |
| 98 |
.Pp |
| 99 |
.Nm Apsfilter |
| 100 |
\&'s |
| 101 |
SETUP utility supports in installing all supported printer types, |
| 102 |
no matter if local or remote printer, |
| 103 |
into the printer capability database |
| 104 |
.Pa @printcap@ . |
| 105 |
.Ss Supported file types |
| 106 |
ar, arc, arj, ASCII, BMP, CAB, cpio, DATA, DVI, FBM, FIG, FITS, GIF, |
| 107 |
Group 3 FAX, HTML, IFF ILBM, JPEG, Kodak Photo CD (PCD), LHA, MGR, MIFF, |
| 108 |
PAM, PGM, PBM, PNM, PPM, PDF, PNG, Postscript (PS), RAR, RLE, RPM, SGI, |
| 109 |
Sketch, Sunraster, TAR, Targa (TGA), TIFF ROFF, WMF, WorPerfect graphics, |
| 110 |
XCF, X Pixmap (XPM), X Window dump (XWD), ZIP, ZOO. |
| 111 |
Note that actual support depends on the installed filter programs. |
| 112 |
.Ss Installation |
| 113 |
Extract the tarball and execute |
| 114 |
.Ic ./configure |
| 115 |
in the |
| 116 |
.Nm apsfilter |
| 117 |
directory (maybe with some options; use |
| 118 |
.Ic ./configure --help |
| 119 |
to see a listing). |
| 120 |
.Pp |
| 121 |
After that, login as root and call |
| 122 |
.Ic make install ; |
| 123 |
then you can set up printers with |
| 124 |
.Ic @datadir@/apsfilter/SETUP . |
| 125 |
.Pp |
| 126 |
SETUP adds the printer to the @printcap@ database to make it available to the |
| 127 |
.Xr lpd 8 |
| 128 |
print spooler, and configures |
| 129 |
.Nm |
| 130 |
for operation with that printer. |
| 131 |
.Pp |
| 132 |
After successfull installation, SETUP remembers its previous configuration |
| 133 |
settings in a file called |
| 134 |
.Pa SETUP.cfg . |
| 135 |
.Ss Command line options |
| 136 |
Several command line options to |
| 137 |
.Nm apsfilter |
| 138 |
are available which allow the user to influence the printing quality, |
| 139 |
color mode, paper size etc. The |
| 140 |
.Em handbook |
| 141 |
includes a detailed listing. |
| 142 |
.Pp Here a short description of options: |
| 143 |
.Bl -tag -width XX_THIS_MUCH_SPACE_XX |
| 144 |
.It Nm draft |
| 145 |
Draft quality. |
| 146 |
.It Nm lo|low |
| 147 |
Low quality. |
| 148 |
.It Nm med|medium |
| 149 |
Medium quality. |
| 150 |
.It Nm hi|high |
| 151 |
High quality. |
| 152 |
.It Nm photo |
| 153 |
Photo quality. |
| 154 |
.It Nm uni|bi |
| 155 |
Uni-/bi-directional sweeps. |
| 156 |
.It Nm plain |
| 157 |
Plain paper. |
| 158 |
.It Nm coated |
| 159 |
Coated (inkjet) paper. |
| 160 |
.It Nm glossy |
| 161 |
Glossy paper. |
| 162 |
.It Nm premium |
| 163 |
Premium (photo) paper. |
| 164 |
.It Nm trans |
| 165 |
Transparencies. |
| 166 |
.It Nm color|colour |
| 167 |
Color printing. |
| 168 |
.It Nm gray|grey |
| 169 |
Gray printing. |
| 170 |
.It Nm mono |
| 171 |
B/W printing. |
| 172 |
.It Nm auto |
| 173 |
Automatic filetype recognition and data conversion. |
| 174 |
.It Nm ascii |
| 175 |
Force printing as ASCII document. For example to print Postscript |
| 176 |
source code without actually interpreting it. |
| 177 |
.It Nm raw |
| 178 |
Pass-through mode, your print data won't be changed by any filter. |
| 179 |
.It Nm a3|a4|legal|ledger|tabloid |
| 180 |
Paper size. |
| 181 |
.It Nm a2ps|mpage|enscript|recode |
| 182 |
Text file filter to use, when printing ASCII documents. |
| 183 |
.It Nm tray0...tray9 |
| 184 |
Paper feed tray number. |
| 185 |
.It Nm pretty=N |
| 186 |
highlight level for pretty-printing (N=0,1,2) |
| 187 |
.It Nm header|noheader |
| 188 |
Whether you want headers in your text prints. |
| 189 |
.It Nm border|noborder |
| 190 |
Whether you want borders in your text prints. |
| 191 |
.It Nm 1pps|2pps|4pps|8pps |
| 192 |
Pages per sheet. |
| 193 |
.It Nm landscape|portrait |
| 194 |
Paper orientation. |
| 195 |
.It Nm book |
| 196 |
Output pages in "book" format, implies "2pps,duplex,shortbind" |
| 197 |
.It Nm duplex|simplex |
| 198 |
Whether to use duplex mode or not. |
| 199 |
.It Nm shortbind|longbind |
| 200 |
Paper binding edge. |
| 201 |
.It Nm copies=N |
| 202 |
Number of copies. |
| 203 |
.Sh EXAMPLES |
| 204 |
.Dl lpr -C high:color:glossy file.gif tex.dvi.gz file.html ... |
| 205 |
.Pp |
| 206 |
prints some files of different types no matter whether compressed or not |
| 207 |
on the Unix default printer (see |
| 208 |
.Xr lpr 1 ). |
| 209 |
.Pp |
| 210 |
The |
| 211 |
.Fl C |
| 212 |
option to the |
| 213 |
.Ic lpr |
| 214 |
command sets additional ghostscript driver-specific options. Here, |
| 215 |
.Ql high |
| 216 |
means |
| 217 |
.Em high resolution |
| 218 |
(e. g. 600 dpi for an HP Printer using gs's |
| 219 |
.Dq cdj850 |
| 220 |
printer driver), |
| 221 |
.Em color output |
| 222 |
(e.g. 32 bits per pixel), and the paper type is set to |
| 223 |
.Em glossy paper |
| 224 |
. |
| 225 |
.Pp |
| 226 |
.Dl lpr -C duplex somefile |
| 227 |
.Pp |
| 228 |
enables |
| 229 |
.Em pseudo duplex printing |
| 230 |
by halting the print queue after printing a documents even pages and so |
| 231 |
giving the user a chance to flip paper and restart printing after executing |
| 232 |
a special user command on the command line. |
| 233 |
.Pp |
| 234 |
User gets a notification mail containing a session oriented magic |
| 235 |
.Em wakeup command |
| 236 |
and |
| 237 |
.Em key |
| 238 |
which restarts printing of the odd pages of the print job. |
| 239 |
.Pp |
| 240 |
The so called |
| 241 |
.Em magic command |
| 242 |
makes sure that only the initiator of the print job is able to |
| 243 |
restart printing after reinserting the paper. |
| 244 |
.Pp |
| 245 |
.Em Beware, |
| 246 |
if you have nasty users, this can cause print jobs to |
| 247 |
hang, filling up the print queue and at least the /var file system. |
| 248 |
.Sh FILES |
| 249 |
.Bl -tag -width @docdir@/apsfilter/handbook.html -compact |
| 250 |
.It Pa @printcap@ |
| 251 |
printer capability data base |
| 252 |
.It Pa @datadir@/apsfilter/bin/apsfilter |
| 253 |
apsfilter script |
| 254 |
.It Pa @datadir@/apsfilter/SETUP |
| 255 |
printer installation script, creates/updates @printcap@ |
| 256 |
.It Pa @datadir@/apsfilter/SETUP.cfg |
| 257 |
saved settings from last printer setup |
| 258 |
.It Pa @docdir@/apsfilter/handbook.html |
| 259 |
the apsfilter handbook in HTML format |
| 260 |
.It Pa @sysconfdir@/apsfilter/ |
| 261 |
configuration directory |
| 262 |
.It Pa @sysconfdir@/apsfilter/apsfilterrc |
| 263 |
global configuration file |
| 264 |
.It Pa @sysconfdir@/apsfilter/apsN/ |
| 265 |
printer specific configuration directory |
| 266 |
.It Pa @sysconfdir@/apsfilter/apsN/apsfilterrc |
| 267 |
printer specific configuration file |
| 268 |
.It Pa $HOME/.apsfilter/apsfilterrc.apsN |
| 269 |
user definable printer specific configuration file |
| 270 |
.It Pa @sysconfdir@/apsfilter/apsN/smbclient.conf |
| 271 |
smbclient config file for printing on Windows remote printer |
| 272 |
.It Pa @sysconfdir@/apsfilter/apsN/pap.conf |
| 273 |
pap config file for printing on AppleTalk printer |
| 274 |
.It Pa @sysconfdir@/apsfilter/apsN/lpr.conf |
| 275 |
config file for remote printer that needs special treatment |
| 276 |
.Sh SEE ALSO |
| 277 |
.Xr aps2file 1 , |
| 278 |
.Xr apsfilter-bug 1 , |
| 279 |
.Xr apspreview 1 , |
| 280 |
.Xr gs 1 , |
| 281 |
.Xr gs-hpdj 1 , |
| 282 |
.Xr lpr 1 , |
| 283 |
.Xr smbclient 1 , |
| 284 |
.Xr apsfilterrc 5 , |
| 285 |
.Xr printcap 5 , |
| 286 |
.Xr lpd 8 |
| 287 |
.Sh BUGS |
| 288 |
See apsfilter software center - |
| 289 |
.Li http://www.apsfilter.org/ |
| 290 |
- for new versions, bugfixes and known bugs. |
| 291 |
.Pp |
| 292 |
Please use the new tool |
| 293 |
.Xr apsfilter-bug 1 |
| 294 |
to release bug- or problem reports. It automatically presents you a |
| 295 |
.Nm form |
| 296 |
in an editor window which asks you some standard questions. |
| 297 |
If you save and quit the editor session, then this report is |
| 298 |
sent automatically via |
| 299 |
.Nm e-mail |
| 300 |
to the proper apsfilter mailinglist. |
| 301 |
.Pp |
| 302 |
If apsfilter fails to print something or prints it in a way |
| 303 |
you wouldn't expect and you want to report an apsfilter error |
| 304 |
then please save the debugging output of one print session |
| 305 |
using the new |
| 306 |
.Xr aps2file 1 |
| 307 |
utility by typing |
| 308 |
.Nm aps2file -D -Z options file > /dev/null 2> file.debug |
| 309 |
and including the debugging output in the file |
| 310 |
.Nm file.debug |
| 311 |
into the edit session of the |
| 312 |
.Nm apsfilter-bug |
| 313 |
utility, so that it is included into the mail to the apsfilter |
| 314 |
mailinglist. |
| 315 |
.Pp |
| 316 |
Please note that you need to run /bin/sh (Bourne Shell), bash |
| 317 |
or a compatible shell, so that the above mentioned output |
| 318 |
redirection works. Under C-shell (/bin/csh) or tcsh it would't |
| 319 |
work. If you don't know, then simply make sure you use the |
| 320 |
Bournce shell by typing |
| 321 |
.Nm /bin/sh |
| 322 |
or |
| 323 |
.Nm bash , |
| 324 |
then you should have no problems with redirection of |
| 325 |
.Nm stdout |
| 326 |
and |
| 327 |
.Nm stderr |
| 328 |
(> /dev/null 2> file.debug). |
| 329 |
.Sh DOCUMENTATION |
| 330 |
See official apsfilter homepage |
| 331 |
.Bl -tag -width XXXXXXXXXXXXXTHIS_MUCH_SPACEXXXXXXXXXXX -compact |
| 332 |
.It Pa http://www.apsfilter.org/handbook.html |
| 333 |
Apsfilter Handbook including the Frequently Asked Questions (FAQ) |
| 334 |
.Sh USER FORUM |
| 335 |
Please send questions to the official apsfilter help channel |
| 336 |
.Ic [email protected] . |
| 337 |
The above section |
| 338 |
.Nm BUGS |
| 339 |
and the file |
| 340 |
.Ic HOWTO-BUGREPORTS |
| 341 |
tells you how to report bugs. |
| 342 |
If you want to know how to troubleshoot your apsfilter installation, |
| 343 |
please read the manpage |
| 344 |
.Xr aps2file 1 |
| 345 |
and |
| 346 |
.Xr apsfilter-bug 1 |
| 347 |
as well as the |
| 348 |
.Ic Apsfilter Handbook |
| 349 |
carefully. |
| 350 |
.Sh HISTORY |
| 351 |
The |
| 352 |
.Nm |
| 353 |
manpage appeared first in apsfilter V 5.4.0. |