Return to BSD News archive
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!yeshua.marcam.com!usc!howland.reston.ans.net!agate!agate!usenet From: andreas@knobel.knirsch.de (Andreas Klemm) Newsgroups: comp.os.386bsd.announce Subject: New apsfilter V2.3 - lpd input filter, filetype auto recognition Followup-To: poster Date: 24 Apr 1994 21:41:53 -0700 Organization: Andreas Klemm, 41469 Neuss, Germany Lines: 222 Sender: cgd@agate.berkeley.edu Approved: 386bsd-announce-request@agate.berkeley.edu Message-ID: <2pdooq$gl@knobel.knirsch.de> NNTP-Posting-Host: agate.berkeley.edu Summary: new version of input filter is released... Keywords: aps apsfilter aps-2.3 lpd printer filter printcap If you are interested in easy handling of printing postscript, ascii and TeX dvi files with no trouble on PS and NON-PS printers then read the next sections about aps-2 ;-) (1) New features (2) WHAT IS APS-2X (3) What do I need for APS-2 (4) Linux specific (5) AUTO CONFIGURATION EXAMPLE (6) enhanced A2PS (7) CHARACTER SETS, GERMAN "Umlaute" (8) Get it via ftp mail (9) Get it via ftp (10) Future Work (1) New features ============ *** An INSTALLATION SHELLSCRIPT, that asks you questions about your printer an sets up /etc/printcap, the spool directories and the symbolic links - needed for apsfilter - to turn on or off certain a2ps and apsfilter features. *** The installation script shows you details about printer filters, so it's no problem anymore to choose between the different filters (i.e.: deskjets). *** Support for real Postscript printers ... *** Further modifications to a2ps ! The page header now contains Filename and the username !!! *** Support for dvips' feature to include postscript files into TeX/DVI Documents (i.e. X11 screenshots using xgrab or xfig images !!! *** New search database, automatically updated by cron. Contains search paths for dvips (updates TEXINPUTS variable for apsfilter) where to look for PS-images. *** print "RAW" Print text with FULL SPEED to the printer without processing through "a2ps" first. Certain lpr options are again recognized. i.e. "-p" to pipe your document through pr(1) first. *** NO TEMP FILES needed any more .... a simple utility REWINDSTDIN allows dvips to read data from a pipe. This SAVES SPACE and makes things FASTER ! *** AUTO-CONFIURATION: After file type auto recognition the next logical step for me was "auto configuration". That means that in general there is no need to "hack" the filter itself for configuration. No need to edit it. You configure it now by naming the filter using a fixed naming scheme !!! The new installation script knows about that features and installs everything (all features) in printcap and makes all possible symlinks in the /usr/lib/apsfilter tree ... [ Printer type, paper format, file type auto recognition and "force printing ascii" (for PS sources) can be selected by creating a symbolic link to apsfilter using a special name. See (5) AUTO CONFIGURATION EXAMPLE. ] For this and future releases I plan additional feature flags. *** Using a2ps to print ascii files. a2ps puts a nice banner around a file and prints two pages on one sheet. That's a very attractive feature. I'll include further options in the next release, that allows enabling or disabling of the "two pages on one" feature for those people, who think, that the font is too small. But you can make modifications very easily in the script. The man page for a2ps is available in the a2ps source directory: /usr/lib/apsfilter/src.a2ps. (2) WHAT IS APS-2 ============= aps-2 is an lineprinter input filter for Unix Systems with Berkeley alike printing system (configuration using /etc/printcap). Main features are AUTOMATIC FILE TYPE RECOGNITION for the filetypes: * ASCII * DATA * POSTSCRIPT * DVI The user needs no knowledge how to print dvi files on his printer or how to print postscript files on his non postscript printer. You only need a lineprinter (laser, ink or matrix), that is supported by gs the free (-> GPL) Postscript interpreter. Since gs has a lot of drivers, it is usually no problem, to get it running. (3) What do I need for APS-2 ======================== The best is a Unix System with the following packages included: - gs 2.4 (ghostscript ps emulator) - dvi2ps This is - for example - the case for Linux Slackware 1.2.0 and future releases. Perhaps I can convince Patrick Volkerding in the near future, to include it into Slackware. (4) Linux specific ============== Since I use a2ps (ascii to postscript) to print ascii files (a compiled and patched version + sources + diffs are included in this package) you either must have a Linux System with the new libc.so.4.5.24 (as in Slackware 1.2.0) to use the binary in the package or you must have a C compiler installed to recompile it, no matter what libraries you have in use. (5) AUTO CONFIGURATION EXAMPLE: * You have a deskjet 500 - You have the paper format DIN A4 * You want filetype-auto-recognition * you want the option two pages on one without print-header Then create a symbolic link to apsfilter using the scheme aps-PrinterType-PaperFormat-PrintMethod-PrintFeature LIBDIR is usually /usr/lib/apsfilter Valid PrinterTypes are described in $LIBDIR/doc/printer "laserjet deskjet ..." Valid Paperformats are described in $LIBDIR/doc/paper "a3 a4 letter ..." Valid PrintMethods are described in $LIBDIR/doc/method "auto ascii" Valid PrintFeatures are described in $LIBDIR/doc/feature "1 2 1n 2n" So: ln -s apsfilter aps-djet500-a4-auto-2n does the configuration trick. In /etc/printcap you say, that your input filter for the wanted purpose is if=/usr/lib/apsfilter/aps-djet500-a4-auto-2n The valid paperformats, supported printers and useful hints are part of the shellscript itself. (6) enhanced A2PS ============= All filters after aps-20 use a2ps to print ascii files. I patched a2ps so you can select paperformat, print margins, filename and username on the commandline instead of compiling it in. I mailed the diffs to the author of the package, but still received no answer. Therefore aps-22.tgz comes with the patched source ready for compiling it. The diffs are also included. (7) CHARACTER SETS, GERMAN "Umlaute" ================================ Using a2ps's -8 option enables the printing of the ISO Latin Characterset. So it's no Problem to print special characters ;-) (8) Get it via ftp mail: ==================== File: aps-23.tgz Size: ~168 KB. mail archive-server@germany.eu.net Subject: <none> uuencode send os/Linux/Incoming.EUnet/aps-23.tgz quit (9) Get it via ftp ============== ftp ftp.Germany.EU.Net login: ftp password: -yourmailaddress binary hash get /pub/os/Linux/Incoming.EUnet/aps-23.tgz quit (10) Future work =========== Get rid of a static and dynamic TEXINPUTS database that is currently updated by cron at a time intervall that you can choose during installation. Next release of apsfilter will scan a users home dir, if there are ps include files for dvips, when printing a dvi file ... And there will be a $HOME/.apsfilter init file for user customizable TEXINPUTS paths ... where each user has the possibility (and the permissions !) to change paths without asking the superuser ... BTW: Thanks to sledge@hammer.oche.de (Thomas Bueschgens), who worked a lot on the dvips TEXINPUTS part and saved the last days of my holidays ;-) There will be a great Version 2.4, really ;-) Have fun Andreas /// -- Andreas Klemm /\/\____ Wiechers & Partner Datentechnik GmbH andreas@knobel.knirsch.de ___/\/\/ andreas@wupmon.wup.de (Unix Support) -- Please send submissions for comp.os.386bsd.announce to: 386bsd-announce@agate.berkeley.edu