LEGAL DISCLAIMER: { The files in the src, lib, toolbin, examples, doc and man directories (folders) and any subdirectories (sub-folders) thereof are part of AFPL Ghostscript. AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author or distributor accepts any responsibility for the consequences of using it, or for whether it serves any particular purpose or works at all, unless he or she says so in writing. Refer to the Aladdin Free Public License (the "License") for full details. Every copy of AFPL Ghostscript must include a copy of the Aladdin Free Public License, normally in a plain ASCII text file named doc/PUBLIC. The License grants you the right to copy, modify and redistribute AFPL Ghostscript, but only under certain conditions described in the License. Among other things, the License requires that the copyright notice and this notice be preserved on all copies. } Send any bugs, problems, crashes, requests etc to: whoosh777@blueyonder.co.uk this file was downloaded from: http://www.whoosh777.pwp.blueyonder.co.uk Please do *not* upload this anywhere as it is a prerelease version: wait till the final version is ready then upload. The source code will be uploaded once the program has taken its final form as a result of feedback. Also a 68020fpu version will then also be recompiled. At the moment the source code is in an extremely chaotic state, however to cover myself legally as regards the AFPL license I can binmail the source code as-is: email me at above address if you really feel this is necessary. This is the only Amiga specific file to download here! Ghostscript is very confusing to understand, but well worth the effort. This file tells you how to install and use this classic Amiga pre-release version of AFPL Ghostscript 8.00 which will sometimes be referred to as GS8. There is no installer script because things get quite complicated. IT IS COMPULSORY TO TRY THE EXAMPLES AT THE END! this will ensure you have installed it correctly and will provide you with templates if you aren't succeeding. Even if you are well versed with other Ghostscripts. Also this version of Ghostscript differs (for well thought out reasons) from other Amiga versions of Ghostscript. To understand Ghostscript, you need to stop thinking of it as an art program and instead think of it as a compiler. This is because postscript files are actually computer programs! Thats why it is such a clever system. Ghostscript needs plenty of stack and takes a lot of time to do things: thats a feature of compilers. Even the simplest of hello-world computer programs require unbelievably many steps to compile. Also you need to think of it as a unix program, it doesn't behave the way you expect an amiga program to behave. Amiga programs are user-friendly and immediately-usable, Unix programs require big learning curves but are often very useful in a technical sort of way. INSTALLING AND USING GS8: 1. Download all the archives: namely fonts6.00_std.lha 1902511 ----rwed fonts6.00_oth.lha 824765 ----rwed gs8bin.lha 1.2meg gs8examples.lha 537689 ----rwed gs8lib.lha 702359 ----rwed gs8doc.lha 1328399 ----rwed For convenience I recompressed the fonts dirs which were originally in doubly compressed .tar.gzip format. 2. Find a hard disk partition with plenty of space (20meg should be enough). Download dirsizes program from here to help clear hard disk space. if possible decompress all the above archives to some empty directory say dest: The remaining steps will assume everything decompressed to dest: However it doesn't matter if the decompression is scattered in many places or partitions, doing it all in one place just makes it easier to explain. If you do a scattered decompression just use multi-assigns. This is what my dirsizes program says of the above decompressed: ------======== SORTED SIZE LIST: =======------ 4052968 bytes: vast:website/gs/gs8.00/doc(dir) 3353812 bytes: vast:website/gs/gs8.00/bin(dir) 2747748 bytes: vast:website/gs/gs8.00/fonts6.00_std(dir) 1882458 bytes: vast:website/gs/gs8.00/lib(dir) 1501946 bytes: vast:website/gs/gs8.00/fonts6.00_oth(dir) 849287 bytes: vast:website/gs/gs8.00/examples(dir) 14336 bytes: vast:website/gs/gs8.00/amiga_readme.RTFI Total size = 14402555 bytes: 9 directories and 540 files. Note: this is just the bytesize, the filespace size will be a bit bigger. 3. Ghostscript needs to be run from a shell (there are GUI front ends around, but all refuse to co-operate with me). a. Choose or open a shell to run Ghostscript from. b. Make a big stack: eg type in the shell: stack 150000 should be adequate. If you dont do this Ghostscript may fail to run and it wont tell you why! c. now do 3 assigns, the assigns incorporate the version no. that way you can run multiple versions of Ghostscript at the same time. The assigns: i. assign GS8: to the directory containing subdirectories bin doc lib examples etc, eg assign GS8: dest:gs8.00 ii. assign GS8Data: to the directory containing gs_init.ps gs_init.ps of earlier Ghostscripts will not suffice. so do eg: assign GS8Data: dest:gs8.00/lib iii. assign GS8Fonts: at least to the directory containing a010013l.afm eg assign GS8Fonts: dest:fonts6.00_std dest:fonts6.00_oth Fonts of earlier versions of Ghostscript are fine eg here we are using Ghostscript 6.00 fonts. Also multiassigns are fine eg you can do a multiassign over lots of Ghostscript versions fonts. (I could have replaced these 3 assigns by 1 multiassign but then it would have been confusing for someone without the docs). 4. Now you are ready to run Ghostscript: do the following examples because they give you a tour of the fundamental useful classes of operations of Ghostscript: the help command, 4 Amiga-specific functions and then a generic non-Amiga function. These examples will prove that you can use Ghostscript. If you have problems it may be because you dont have enough memory or your printer doesnt have enough memory, in which case try a different test file from GS8:examples. Example 1. The help command: type from the above shell: GS8:bin/gs_000 -h Wait a while (20 seconds on a 50MHz 68030) and GS8 will display eg some handy command line options, and a cryptic list of all available output devices which include on-screen-viewers, printer-drivers and graphics-file-formats. Example 2. The default amiga device. View a postscript or pdf file on a workbench window: Type from a shell: GS8:bin/gs_000 GS8:examples/tiger.eps Now be patient, GS8 being over 3megs in size takes a while to load. GS8 will display its disclaimer message, then will open a workbench window, and gradually a picture of a Tigers face will be rendered. This is a 2 palette picture just black and white. When you print with GS8 the image is of a far higher quality! Wait for the message on the shell: press return for the next page. tiger.eps has an empty 2nd page. Finally when you get the GS> prompt, just type quit to exit. You can exit at any time by typing control-C in the shell you started GS8 from. GS8 does not necessarily exit immediately, this is because unix programmes have very strict rules about exiting: eg they will delete any partially formed files. Unix programmes always leave things in a squeaky clean condition when they exit. Variant Example 2.1 View a postscript file which has fonts. gs8:bin/gs_000 gs8:examples/alphabet.ps Watch those fonts load. Variant Example 2.2 View a pdf file. gs8:bin/gs_000 gs8:examples/annots.pdf Type control-C in the shell when you've had enough. Example 3. The amiga custom screen device. THIS FEATURE SOMETIMES CRASHES: especially if you move the mouse around a lot while it is rendering. It is even more likely to crash if you keep mouse buttons depressed whilst moving mouse around whilst rendering. I have spent almost a week trying to fix this without luck. I think there may be a bug either in gcc2.7.0 's event handling or in the OS. I think the crash is caused by a build up of unresponded to OS messages eventually causing the screen to freeze up. However as this feature produces very impressive output it is worth looking at and if you politely wait for the rendering to finish before mouse scrolling it probably wont crash. Type from a shell: GS8:bin/gs_000 -sDEVICE=amiga_custom GS8:examples/tiger.eps Eventually GS8 will display its disclaimer then a screen mode requester eventually pops up. USE THE SUGGESTED GRAPHICS MODE. Experiment later not now. A screen will eventually appear with the tiger, when the tiger is fully rendered click in the screen, move mouse around and you will see the picture is an autoscroll picture. Get the next page from the shell. Again if necessary exit by control-C in the shell. If GS8 failed to display the tiger, it is possible that your machine has too little free memory. Try the same command on a different file in GS8:examples This crashing feature is the only unfixed bug I am aware of in this port. Example 4. The Workbench printer driver output device. Do this if your printer has a Workbench driver. Type from a shell: GS8:bin/gs_000 -sDEVICE=amiga_printer -sOutputFile=- GS8:examples/tiger.eps wait and eventually your printer will print out the tiger. On my machine 50MHz 68030 it takes longer than 1 minute before the printing begins. Press return each time you are prompted for each page to be printed. When you get the "GS>" prompt type quit to exit. The order of the above arguments *does* matter! Each argument applies to all further arguments on its right. So if you put -sDEVICE=amiga_printer last NOTHING GETS PRINTED!!! :this is because there is no file to the right of the amiga_printer device! Instead you get the tiger in a workbench window. This happened to me when I first started. Example 5. Convert postscript or pdf document to ilbm files! You can then view/print these iff files eg on Deluxe Paint etc type from the shell: GS8:bin/gs_000 -sDEVICE=amiga_ilbm -sOutputFile=ram:tiger GS8:examples/tiger.eps Note that in these examples the file to view always comes last. on my 50Mhz 68030 it takes 21 seconds before anything happens (the disclaimer). Press return each time prompted, when you get the GS> prompt type "quit" to exit. In your ram: disk you will find 2 files ram:tiger_0001.ilbm and tiger_0002.ilbm! you can now view these eg in Deluxe Paint. Quit at any time by typing control-C in the shell. Example 6. Print postscript or pdf files using GS8's inbuilt printer drivers. Choose the driver name from the list you see when you do Example 1. eg if you have an epson compatible printer type: GS8:bin/gs_000 -sDEVICE=epson -sOutputFile=ram:tiger GS8:examples/tiger.eps press return when requested and type quit at the GS> prompt. The tiger is not yet printed, however it is in the file ram:tiger. To print it just type copy ram:tiger par: I have tested these epson examples on my epson compatible star-LC10 printer. NOTE: WE ARE COPYING TO PAR: *NOT* TO prt: Here is a second method for doing this: GS8:bin/gs_000 -q -dBATCH -dNOPAUSE -sDEVICE=epson -sOutputFile=- GS8:examples/tiger.eps >par: Explanation: -q stops GS8 printing out the disclaimer etc, -dBATCH => print all the pages of the document, -dNOPAUSE=> dont pause for user input between pages. >par: redirects output to parallel port. Now comes a problem, my new printer is a Samsung ML-4500 laser printer which is a mere 75 pounds, and produces unbelievably high quality printout. It was the impressiveness of this printer that motivated me to do this port. There were no workbench drivers, no Amiga Ghostscript drivers, no Turboprint support, no Print Studio support. Eventually I downloaded a Ghostscript driver source code for this printer. I recompiled (my first ever recompilation) Amiga GS5.10 to incorporate this driver. I then found the driver had some major bugs. I debugged this over a number of days. I now got perfect output. I then decided to get greedy and recompile a current Ghostscript: this is the outcome. I had a choice: either recompile GS5.10 or take the printer back for a refund. This Samsung driver is incorporated into this GS8. It doesn't come with the standard GS8 on other platforms. The original driver written by Samsung was called gdi, with a bit of trickery I renamed this samsung_gdi, it is the driver for: Samsung ML-4500, ML-2xx, ML-1xxx, ML-5080, ML-6040, ... and Lexmark E210 although I have only tested it on the first item in this list. To the problem: I am using a4 which is not the default so I put this fact in the command: GS8:bin/gs_000 -q -dBATCH -dNOPAUSE -sDEVICE=samsung_gdi -sPAPERSIZE=a4 -sOutputFile=- GS8:examples/tiger.eps >par: nothing gets printed. You will now understand the advantage of outputting to a file instead of directly to the printer. Doing the same command but to a file and simplified a bit: GS8:bin/gs_000 -sDEVICE=samsung_gdi -sOutputFile=ram:samsung -sPAPERSIZE=a4 GS8:examples/tiger.eps Now when I type list ram:samsung I get: samsung 2134609 ----rwed Today 20:59:55 This is the problem: this printer has a 2 meg RAM, 2 meg == 2097152 bytes: the file is too big for the printer. This is a 600dpi x 600dpi printer, the problem is solved eg by choosing a smaller resolution: GS8:bin/gs_000 -q -dBATCH -dNOPAUSE -sDEVICE=samsung_gdi -r300 -sPAPERSIZE=a4 -sOutputFile=- gs8:examples/tiger.eps >par: producing a lo-res a4 tiger, or GS8:bin/gs_000 -q -dBATCH -dNOPAUSE -sDEVICE=samsung_gdi -r500x500 -sPAPERSIZE=a4 -sOutputFile=- gs8:examples/tiger.eps >par: producing an almost a4 sized high res 600dpi x 600dpi tiger. Anyway this example shows how you sometimes have to get your hands dirty to use GS8. To specify a resolution of A by B you type -rAxB and for A by A you type -rA eg -r300 is same as -r300x300 Thats the end of the crash course in GS8. **************** Miscellaneous comments and remarks ****************** Imperfection delivered today is better than perfection promised for the day after tomorrow. Note: the crashes mentioned above in -sDEVICE=amiga_custom are not really a big deal: because you can always convert your xyz.ps file to an iff file with GS8 and view it in excruciating detail on eg DPaint without freeze-up crashes . Maybe the bug will vanish if I do an ixemul recompile. There is a catch-22 problem though: I am using gcc2.7.0 which requires ixemul.library v.48 to run but when it does an ixemul compile the output will not run on v.48 ixemul.library. but requires v.41 (or 43?) But then the v.48 ixemul programmes eg its parent gcc2.7.0 refuse to run: infuriating. I could try gcc2.7.2.1 but the docs s.u.c.k. I can see whats coming: I'll have to recompile gcc2.7.0: using gcc2.7.0 (starts jumping up and down tearing his hair out and munches his pillow!) Generally I only view the first few pages of a document on the GS8 workbench window viewer, I then convert the document to printer binary files with GS8's samsung_gdi driver for my printer. Then I print out say 10 pages look at them and decide if its worth printing the rest. After printing the pages I delete the binary files because they eat up so much disk space: the printer binary page files of one 242 page pdf document I did, ate up 70 megs of disk I didn't realise this until I ran my dirsizes programme. dirsizes is great for pinpointing files + dirs to delete on a large partition. dirsizes also has a recursive option for a single decreasing-size-sorted list of all subdirectories and files however deep. (dirsizes dirname -r ) If you have a very deep directory structure give dirsizes a big stacksize. I began writing dirsizes in order to pass the time whilst waiting for some GS8 source files to recompile. It was just a mini 1 afternoon project. The full GS8 recompile takes about 8.5 hours to complete on my 50Mhz 68030. On a G3 it would take: 8.5 * 60 minutes/100 = approx. 5 minutes!! scary? To do a batch job put eg -dBATCH -sOutputFile=page%d and out will come page1 page2 page3 etc (%d is like a C notation reversed wildcard for 1 2 3 etc) If anyone figures out how to print out in a random access way from a ps or pdf doc using GS8 please email me. eg if you have a 100 page doc, how do you print eg pages 53-59 without having to do the whole lot: 1 , 2 ,3 ,...59? Its probably in the doc/#?.html files: but they are so labyrinthine that I havent found it yet. send emails about problems, etc to whoosh777@blueyonder.co.uk Put as much info as will fit in the email subject line to save me time.