Atari Ghostscript 3.33, Release 0, 8/95


Ghostscript installation will almost always require the user
to set an environment variable called GS_LIB. If you don't
set this variable, GS will most likely abort on start-up.
GS_LIB should be equated to a comma separated list of
directories that contain the PostScript startup files,
the Ghostscript fonts, and (optionally) the Ghostscript
help files. See below for more details.

PostScript is a programming language whose executable statements draw
an image on a page. It is not an image format like GIF or JPG, which
contain (compressed) information about the pixels of a bitmapped image
at some specific resolution. PostScript programs may give
resolution-independent descriptions of an image, and they may also
contain resolution-dependent bitmaps.
Aladdin Ghostscript 3.33 is a PostScript language interpreter which is
free to non-commercial users (the kernel is written and maintained by
Peter Deutsch -- ghost@aladdin.com). It can be used to convert
PostScript files into bitmapped formats suitable for non-PostScript
printers, or to display PostScript files on the screen. It is also
quite nice for PostScript code development. Beginning with version
3.33, Ghostscript can also display files formatted in Adobe's Portable
Document Format, or PDF.
If you are used to using GIF and JPG viewers, the behavior of
Ghostscript may seem a little strange. For example, the pages of
multiple page documents can generally be viewed only in sequential
order. Moving back to a previous page would amount to jumping
backwards in the program. There are ways around this limitation, but
they are awkward. Ghostscript does not behave like other file viewers
because it is NOT a file viewer. It is a program language interpreter
(like a BASIC interpreter).
The binary distribution of the Atari release contains an executable,
the PostScript support files, the help files, and the default font
(Courier). GS searches for the support files in all directories
contained in the comma-separated list assigned to the GS_LIB
environment variable. The default value for GS_LIB is
".,f:\gs\help,f:\gs\ps,f:\gs,f:\gs\fonts". To avoid potential filename
conflicts, the path to the help files may be specified separately by
the GS_HELPDIR environment variable.
The Atari port of GS consists of the standard Unix source code, plus a
few files that handle Atari-specific functions. The Atari source code
is available for ftp from
ftp://lifshitz.ph.utexas.edu/pub/atari/ghostscript/3.33/gs333s.zoo. The
standard source code and the remainder of the fonts for 3.33 (you can
use the old fonts if you want) are available from ftp.cs.wisc.edu.
This site can be accessed from the Atari Ghostscript WWW page at
http://godel.ph.utexas.edu/Members/timg/gs.html. You should be aware
that most of the Ghostscript font set is not very good. If you need
high-quality text output, you may want to buy a commercial font set,
or restrict yourself to the few GS fonts which are of high quality.

A 300dpi image requires a little over 1M. you probably need a minimum of 4M ram and 1M of free disk space (as long as you write no files to disk). (Try using the -dNOCACHE option if you think fonts are using too much memory. Most shells have commands . I run GS on a 4M 520ST with an 85M hard drive and a monochrome monitor. some fonts (at least the default font -.) Directories specified by the GS_LIB environment variable are checked next.doc).) You can probably get by without a hard drive if you are willing to use only the Ghostscript default font. When Ghostscript needs a file. so you may have to decrease the resolution for color images (screen images cannot be printed in bands). Ghostscript will ABORT! The fontmap file contains a list of which fonts reside in which disk files. the default font is fine. GS will most likely abort on start-up. Documents which load lots of fonts can also hog lots of ram. You may want to review it after getting GS installed. You can always try with less. If you get all of the GS fonts. it searches a list of directories until it finds what it needs. GS rasterizes PostScript images in a buffer in RAM. 2. Gem users may be unfamiliar with environment variables. On-line help files (in the help directory) are optional.Later in this file is a brief description of some features which are specific to the Atari platform. Ghostscript must be able to locate all of these files in order to execute successfully. Basically. it reads a number of the PostScript files to initialize itself. When GS is executed. If it cannot find these initialization files. If you don't set this >>>>>>>>>> variable.) Directories to be searched can be specified from the GS command line with the -I option. so high resolution printing requires either lots of memory or band printing (see use. but text output won't be great. 3. since ALOT of memory is allocated dynamically. The font files take up about 3 Meg of disk space. you will need another 3M of disk space. >>>>>>>>>> This will almost always require the user to set an >>>>>>>>>> environment variable called GS_LIB. Color is a real memory hog. SYSTEM REQUIREMENTS: To run GS 3.) The current directory is searched first. For graphics.in the fonts directory).33. and a file called fontmap. How much you can get by with really depends on the PostScript files you want to process. this is just a global variable stored by the computer in a location which is accessible by all programs running on the machine. INSTALLATION: The use of Ghostscript requires a set of PostScript support files (in the ps directory). Which directories it searches is determined as follows: 1.

ttp" or "gs. . . you may need an auto-folder program (I believe GEMENV is the name of one such program) which will set environment variables for you. When GS needs a file. 2) Unpack the archive with 'zoo e// gs333b. You will probably want to set up your system so that this environment variable is defined automatically at boot time. it first looks in the current directory (. If your system does not support the ".prg". and 'fonts' directories. these environment variable entries will not be saved when the "Save Config" menu is selected.d:\gs. 4. help. Ghostscript will look for a global environment variable named GS_LIB. the path to the help files may be specified separately in the environment variable GS_HELPDIR. (current directory) GS executable.zoo (probably truncated to gs333. This comma-separated list of directories is called a "path".\help PostScript and ASCII help files. If you want the root gs directory to be somewhere besides f:\gs. If you are running from the desktop. you will want to set up your computer to automatically define GS_LIB to be a COMMA separated path (corresponding to your setup) for Ghostscript to search. rename the executable to "gs. GS fonts and the fontmap file. Optionally. then in f:\gs\help. . If the directories used in your installation do not correspond to the default path. If the environment variable GS_LIB is set to "c:\gs.rc. define the environment variable GS_LIB to be a comma separated search path which contains the files in the 'ps'.zoo) to the desired directory (f:\gs to use the default search path). . and e:\gs in sequence for the files that it needs. I have Ghostscript installed as follows: f:\gs f:\gs\ps f:\gs\fonts f:\gs\help GS source and executable.that allow you to set environment variables. Look in the stgs. GS PostScript support files and other PostScript source (pictures). d:\gs. To install: 1) Copy gs333b.rc file for the proper syntax. Environment variables can also be set from the Atari Ghostscript startup file stgs. If your installation corresponds to the default path.f:\gs\ps. then in f:\gs\ps. GS searches a default path of ". depending on whether you wish to be prompted for input when GS is executed.e:\gs" GS will search the directories c:\gs.\ps GS PostScript support files and examples.f:\gs.) If the GS_LIB variable is not set.).\fonts Default font and fontmap. GS ASCII and PostScript help files.zoo' This will produce a directory structure as follows: .f:\gs\help. and finally in f:\gs.f:\gs\fonts".gtp" extension. you need not worry about any environment variables. f:\gs\fonts. This corresponds to my setup.. but at the moment.

be automatically Once operations and the On-line help about any menu item can be invoked by holding down any meta key (control. the output device. or can be specified from the command line. The mouse will turn to a busy bee while GS is creating a bitmap of the image.. you can use the menu items to perform like selecting the page size. GS displays a GS> prompt in the console window. For example. etc. but it may take forever to construct your image. either: a. Press the help key for further information. and type "q" when you have finished viewing the image. "gs -sDEVICE=epson file. The use of windows may be disabled by setting the environment variable GS_WIN to "off". You can specify (with the -r option) as much resolution as you have memory for. you can define a shell alias for "gs -sDEVICE=djet500". you can move around the image with the cursor keys..ps". command line. When all pages have been displayed. Postscript commands typed in the console window will then be executed by the PS interpreter.ps) run" after the prompt will cause file. or install gs to executed by double-clicking on PostScript files. Type "gs -sDEVICE=djet500 file.ps file2. 2) To use a printer device: A printing device can be selected from the "Options" menu. In this case.' on the command line. Type "gs -h" for a list of available printer devices. Further files can be viewed by clicking on the "Open" menu item and choosing the desired file with the file selector.gtp. Usually the last postscript command on a PS page will be "showpage".gtp. or shift) while selecting the menu item. If you like. and provide any parameters you like in the dialog box. The showpage command causes the page to be displayed and then waits for the user to enter a <return> before proceeding to the next page. an image window will eventually open and the image will be displayed (this can take a long while for complicated files or high resolutions).ps" on the command line for a deskjet 500.USAGE: To use Ghostscript: 1) To display a file on the screen. The default device is the screen at 80 dpi. If you are using the screen (stvdi) device.) Double-click on gs. GS will open a console window.ps . PostScript files need not be specified on the GS You can double-click on gs. and will write some initialization messages to it. alt. image resolution.ps to be displayed. b. Filenames can be omitted and opened later from within the program. You can then scroll around the image using the scroll bars or the cursor keys. typing "(file. inside GS. The printer .) Type 'gs file1.

In this case. 4-. and stderr are directed to it. GS spaces colors equally throughout the color cube. The fuller button can be used to iconify windows in the same way (meta key. alt. output device. windows are iconified with the smaller button instead of the meta-fuller button. For 2 and 4 bit color.) The stvdi screen device supports 1-. 16. is alot of image transformation. so it may not end up exactly where you put it when you move the window. Here is a brief overview of the Atari-specific features: 1. a console window is opened and stdin. and then approximates the .. or right edge of the window. 8-. left edge. and page size without exiting and restarting GS. If the CEN: output file has not worked for you in the past. output can be redirected to a file of your choosing. the arrow buttons can be used to move to the top. OutputFile=PRN: or CEN: will send output to the printer port (CEN: prints faster. This is accomplished by holding down a meta key (cntl. 2-. bottom. which is supposed to improve text output speed. since GS takes alot of time to initialize. but is less compatible)." menu item will allow output to be sent to a named file or directly to the printer. so graphics should work with lots of different screen devices. ATARI FEATURES: Most of the Atari-specific features are documented in the on-line help... Vdi routines are used to determine the screen parameters and to copy to the screen. The 24-bit color has not been thoroughly tested. The output file name can also be selected from the dialog opened by the "Print . Use of windows may be disabled by setting the GS_WIN environment variable to "off".XXX". so I won't go into much detail here." menu. text output is accelerated by avoiding both clipping and walking the usual rectangle list. but they do not all In addition to their normal function. if at all. The x coordinate of text windows will always snap to the nearest word. Menus are provided to change things like resolution.and hopefully 24-bit color. so it may not work properly. Some transformations are written in assembler in an attempt to speed things up a bit.. please try it again. The screen driver allocates colors dynamically as the GS kernel requests them. This can save a good deal of time.) When GS is started. or to the printer with the "-sOutputFile=filename" option. I think this bug may now be fixed. or shift) while clicking on the arrow. In newer versions of TOS. This is an attempt to keep the text word aligned. where XXX is a unique number. From the command line. stdout. Selecting the "Print .output will be written by default in a file called "gs_pr. Text output speed is improved if the console window is topped. 2. click). The windows contain the standard gadgets. The price of compatibility. however.

High resolution Epson 9-pin device (makes multiple passes). . HP DeskJet 500. this driver sends output directly to the printer (running the Diablo emulator). 4.) The number of available drivers has increased to the point that it is not feasible to include all that an ST owner might reasonably use. stvdi slm gemimg . H-P DeskJet 500C (same as cdjcolor) HP DeskJet 550C/560C.Atari SLM laser printer (thanks to Robert Stabl). the original palette is restored when GS exits. 16. HP LaserJet 4P. Type 'gs -h' for a list of the available drivers. The option '-sOutputFile=CEN:' will write output directly to the centronics port. Of course. so the newest one is recommended. Supports 1. A subtle bug that caused centronics printing not to work on some machines may now be fixed (thanks to Andrew Paterson). deskjet djet500 cdj500 cdj550 - Generic HP DeskJet. Some problems have been reported with using the old Diablo emulator. and users may encounter memory problems when printing certain documents (like those with lots of fonts). HP LaserJet 2P. Thanks to Markus Wenzel for the routines to set and save the color palette. Epson ESC/P 2. The routines for direct centronics output were contributed by Chris Strunk (CS-TeX)--THANKS! Direct centronics output is generally much faster (about a factor of 4 for heavy graphics). 8. Color epson printers. the SLM driver is a major memory hog.) There are two ways to send output directly to the printer. . 2.GEM bitmap format (thanks to Marcus Haebler).Canon BubbleJet BJ200 epson eps9high epsonc ap3250 - Epson 9 and 24 pin printers (limited resolutions). 3. . HP LaserJet Plus. HP LaserJet 3P.needed colors by dithering the two closest colors in the palette. & 24(?) bit color. so give it a try if it failed to work in the past. Also. GS attempts to avoid changing the color of the desktop and of window gadgets.Canon BubbleJet BJ10e .The screen device. bj10e bj200 . but if your image needs lots of colors. The current choice of 21 drivers was decided mostly by a vote of GS users on the internet (a couple were included at my whim). Including '-sOutputFile=PRN:' on the command line will send output to the centronics port via Gemdos. For those with an Atari SLM laser printer. this may not be possible. laserjet ljetplus ljet2p ljet3 ljet4 - Generic HP LaserJet. so there is no need to specify the OutputFile. you may see colors changing on your screen while GS is running. Because of the dynamic color allocation. 4. These options can also be selected from menus after GS is running.

2.st800 necp6 . An alert is used to keep the console window from closing before the error message can be read.Epson Stylus 800. 1. GS_DISPLAY: Set this to "chunky8" to tell GS that your screen hardware uses chunky pixel format. 4. 5. you should have the latest Diablo emulator to avoid output problems under MultiTOS. Otherwise GS will transform GS's native chunky format to standard GEM color planes. . LIMITATIONS and POSSIBLE PROBLEMS: See the doc files for some known bugs and problems.) Programs which take control of the printer port can interfere with Ghostscript's Atari SLM laser printer device. pbm pbmraw pgm pgmraw ppm ppmraw - Portable Portable Portable Portable Portable Portable Bitmap (plain format) Bitmap (raw format) Graymap (plain format) Graymap (raw format) Pixmap (plain format) (RGB) Pixmap (raw format) (RGB) 5. Otherwise the value of this variable is ignored. GS_WIN: Set this to "off" to disable windows.) 24-bit color has not been tested. and then transform back to chunky format for display.) The following environment variables are specific to the Atari port of GS. it may not work properly. I doubt it is of interest to anyone else.) The CEN: output option may not work properly on some STEs and TTs. TIPS: Here are a few miscellaneous tips. I don't think any graphics boards actually use this format. but the alert itself may cover some of the error message. See use. I think this bug is now fixed.) Fatal errors are still not handled gracefully. . Also. Setting it to "gdebug" will cause some debugging output to be printed to the console. GS_DEBUG: This is used by me during debugging. 3. KNOWN BUGS. but am not sure.NEC 360 dpi printer.doc for standard environment variables (like GS_LIB). but if they do. GS_HELPDIR: This is a comma-separated path to search for the Atari Ghostscript help files. this will allow GS to skip two image format transformations and save some time.) Control-C to abort printing is not handled very gracefully.

Color palette save and restore routines. since TeX fonts are not resolution independent. 3) An archive named ps_picts. GS is an excellent tool for learning PostScript programming. For gcc and numerous library bug fixes. 2) Try to arrange things so that you don't have to restart GS very often. the ORCS resource editor. Some of the more direct contributions are: Hauke Hess: Robert Stabl: Marcus Haebler: Chris Strunk: Steve Eker: Steven Ourada: Markus Wenzel: Andrew Paterson: Thorsten Otto: J.bug comp.lang. 360 dpi NEC P6 and GEM image drivers.zoo contains some files on which to test Ghostscript. putting the initialization files in a ram disk significantly decreases initialization time (at least on my system). Note that 300dpi TeX documents will not look very good when viewed on the screen at 80dpi. Dvips allows PS graphics to be easily included in TeX documents. Search the file for GS or >. Possible fix to the centronics bug. If you MUST restart GS often.postscript comp. Contributed assembly image transformation algorithms.ghostscript. and GS can be used to preview TeX documents which contain graphics at high resolution (if you need this sort of thing and have the memory). 4) GS can be used to view or print the output of dvips (TeX dvi to PS translator). This startup takes a good deal of time. Many other changes can be made in this file to alter the behavior of GS. For example. dvips. Contributed code for direct centronics printing. but it is helpful and is quicker than sending me questions. and then change this to whatever you want the prompt to be. The combination of TeX (a typesetting program). European users can also set the default page size to A4 in this file. I have tried to make this easier by providing menus to perform some common operations. 5) You can change the Ghostscript prompt by editing the gs_init.1) Read the supplied documentation! It is a bit sparse for beginners. you can redefine the 'showpage' command so that it doesn't wait around for a CR to be typed after every page (this can also be done from the command line or a menu). These are some of the files that where used to test the port. 6) You may find interesting things in the following Usenet newsgroups: gnu. you will probably need to buy a PS programming book. Code fixes and enhancements.doc is the most important file for casual users. .sources. If you want to learn PostScript programming.postscript ACKNOWLEDGMENTS: Many kind people have contributed to the Atari version of Ghostscript. Contributed assembly image transformation algorithms. Use. but it is not the intention of the docs to teach PS to you. The Atari SLM laser printer driver. I have gone up to 300dpi and it seems to work OK.ps file. Bammi: Original screen driver upon which stvdi was based.

most likely be valid through December 1995.Please forgive me if I forgot to mention an important contribution. This WWW page and the email address have an uncertain future.cs.html. FOR MORE INFO: The original source files. They will.attmail. which contains a Ghostscript Frequently Asked Questions list.ph.utexas.wisc. and gently remind me of my omission.edu/Members/timg/gs. however. Send bug reports to: Tim Gallivan gallivan@ufpsprod. in addition to some screen shots and other information.edu.com . and fonts can be obtained from ftp. There is an Atari Ghostscript WWW page at http://godel. docs.