Le GNU a2psPorts to the M$ world |
||||||||||||||||
|
There are two ports of a2ps under MS. Please, read carefully the
information bellow if you want the installation to be smooth...
MS-DOS port of 4.12Ansgar Duelmer (Ansgar.Duelmer@anorg.chemie.uni-giessen.de) has worked on a port of a2ps to MS-DOS thanks to DJGPP. It works well under Windows too. The following documentation, on how to install and use a2ps together with other advices, is thanks to Lance W. Patterson (lancep@bcm.tmc.edu). WINDOWS As a Unix user, you probably are used to having Postscript printers. But, this is a problem for most of the "x86" Windows users. Most printers now have their own native printing language, and the manufacturer will provide a driver to use it under Windows 3.x/9X/NT. If you do purchase a Postscript printer, expect to "shell out" a lot of money. Please note that it would be advisable to have a minimum of 2MB of printer buffer memory for laser printers. If you plan to print at resolutions higher than 300x300, you should have at least 4MB of buffer memory. I was definitely in this group of people. I did not have a Postscript printer, but I really wanted to use "a2ps". Fortunately, I came across a port of "Ghostscript", well known to the Unix world, for WIN32. The WIN32 port solved my problem for printing at home. I had a very inexpensive laser printer that did not have Postscript capabilites. The solution was a simple batch file. First, you must download and install "Ghostscript" & "Ghostview" from http://www.cs.wisc.edu/~ghost/. Assuming you have chosen the default directories for "a2ps", "Ghostscript", and "Ghostview", use the following batch file. @ECHO OFF CD C:\a2ps\bin A2PS "%1" --medium=letter -o %TEMP%\temp.ps CD C:\gstools\gs5.50 gswin32c -dNOPAUSE -sDEVICE=mswinpr2 -q %TEMP%\temp.ps -c quitDEL %TEMP%\temp.ps It is very simple. Assume the batch file is called "a2pswin" and you have a "C" source file that you want to "pretty print", but you don't have a Postscript printer. You would type a2pswin c:\data\c\fastlink\original\comoutput.c "a2ps" would make the "pretty print" postscript file, place the file in your "TEMP" folder, and run "gswin32c" to print the file. If you're wondering, here are the "gswin32c" options. -dNOPAUSE Don't pause after each page -sDEVICE=mswinpr2 Use Windows printer driver -q Quiet Mode -c quit Automatically quit after printing has finished. If you add a shortcut to your desktop, set the shortcut's properties to "Close on Exit", you can have it print in the background. With the "shortcut" on your desktop you can use "Windows Explorer" to "drag" the file you want to print to the "shortcut" and it will print in the background. The only problem with doing it that way is that Windows will not send the "long" filename on the command line, but the "8.3" filename. Using supported printer drivers DOS works exactly the same, but you must specify a "built-in" printer driver. I have a Laserjet 5M in my office at work, so I can use the Laserjet IV driver. There are two benefits for using a "built-in" driver. First, you will not be prompted to print with the Windows printer dialog box. Second, there is a small performance increase. @ECHO OFF CD C:\a2ps\bin A2PS "%1" --medium=letter -o %TEMP%\temp.ps CD C:\gstools\gs5.50 gswin32c -dNOPAUSE -sDEVICE=ljet4 -sOutputFile=lpt1 -q %TEMP%\temp.ps -c quit Type "gswin32c --help" for a list of printers with "built-in" support Windows port of 4.8.3There is a port of a2ps 4.8.3 for Windows in ftp://ftp.enst.fr/pub/unix/a2ps/Windows-Version/, but we are not proud of it. It is old, and tricky to install. It uses Cygnus' Win32.dll. Basically you need to take the .EXE, launch it, copy a2ps.exe and cygwin32.dll in your path, move the misc/ directory to a place you like, and have the environment variable A2PS_LIBRARY point to that directory. Be aware that for A2PS_LIBRARY you'll need to use the DOS naming convention (with \\). Please, we need help from somebody who would be ready to use a more recent a2ps with a more recent Cygwin32. |
|||||||||||||||