AFPL Ghostscript and Angus Duggans PSUtils for RISC OS

  • News
  • What are they?
  • Where to get them
  • Installation
  • Use of AFPL Ghostscript
  • Use of PSUtils
  • Supporting software
  • Mailing list
  • Problems....
  • News

    Updated 10th January 2002 - Updated to AFPL Ghostscript 7.03.

    Some of the changes include:

    • Many improvements to PDF writing, output from Ghostscript looks much better when viewed with recent versions of !PDF.
    • General bug-fixes and speed improvements, throughout the application..
    • The RISC OS version of AFPL Ghostscript includes a device for writing RISC OS Sprite files.
    • For the first time I have put up the stuff which allows me to build Ghostscript on for RISC OS.

    What are they?

    AFPL Ghostscript is a a fully functional PostScript language interpreter available for most platforms. Take a look at and for more details. AFPL Ghostscript is copyrighted by Aladdin Enterprises and is distributed under the AFPL (Aladdin Free Public License), it is basically 'free for normal use' - see the web site for more details. 

    The version of Ghostscript available here is 7.03. 

    PSUtils is a set of page imposition tools for postscript files - for example putting multiple pages per printed page, selecting pages from a document, resizing the pages or completely reorganizing the print order, placement and size of the pages. PSUtils has been written by Angus Duggan and this RISC OS port is all my fault.


    Where to get them

    Both Ghostscript and PSUtils are being made available by FTP on in the directory pub/utils/postscript - use the links below. 

    Ghostscript 7.03 is split in five parts: 

    1. The RISC OS application and support files: (835 KB) - New 10-January-2002
    2. Required ghostscript support files: (1074 KB) - New 10-January-2002
    3. Ghostscript documentation: (903 KB) - New 10-January-2002
    4. Standard ghostscript fonts: (1311 KB)
    5. and: (518 KB)
    You need ALL five files. The application, documentation and support files have changed from the previous release, but the fonts remain the same if you have them already. Please note that all of these files are changed from the much earlier, and completely unrelated, 4.03 release.

    To build Ghostscript for yourself you will need: (77 KB) - New 10-January-2002
    and probably a fair amount of patience. This includes the RISC OS specific source code and makefiles. It also includes the few code changes I made to the Ghostscript code itself. Finally it includes the scripts used to automate the job of building Ghostscript. Some small parts of the code are borrowed directly from UnixLib. If you have the stomach for it, download, try to follow the instructions, see how you get on, improve it if you dare .....

    PSUtils is available in a single file: (354 KB) (current version 1.16). 

    Please note: is a Spark archive, the Ghostscript files are ZIP format.



    Ghostscript installation:

    As it stands Ghostscript needs support for long filenames and more than 77 files per directory so, if you have RISC OS 4 and an F+ format drive decide where you are going to keep Ghostscript and skip to step 3.
    1. To install Ghostscript first get a copy of raFS or X-Files (but not Longfiles since it doesn't support > 77 files/dir). 
    2. Create a new raFS disc or X-File and open it.
    3. Extract the contents of each archive into the directory just opened.
    4. That is all - you should end up with one application, !Ghostscr, containing 6 files (!Boot, !Run, !Help, !Sprites, gs and ghost) and three directories (one called 7_03, one called fonts and one called bin). 
    (It should be possible to split the support files and fonts into several directories - the Ghostscript search path for relevant files can be altered by setting the system variable GS_LIB to a comma separated list of directories. Much more reorganization is needed to remove the requirement for long filenames - and this may have to be re-done for every new release so I prefer to use one of the options mentioned above.) 

    PSUtils installation:

    Installation of PSUtils is simple - copy the application to wherever you like and start using it.

    Use of Ghostscript

    The simplest way to use Ghostscript is to get hold of !GView and !PS2Pdf (details below). To view a PostScript file run !GView and double click on your file. To convert a PostScript file to a PDF doument run !PS2Pdf and drag your file to the PS2Pdf icon on the icon bar. Each application has options to control settings passed to Ghostscript.

    Alternatively you can use the command line. An alias has been created so that Ghostscript can be run from the command line at any time (I chose not to alter Run$Path). Just type gs -h at a command prompt to get a little information. Have a look at the full documentation for more details of how to use Ghostscript. 

    Some common operations with Ghostscript have also been given aliases: 

    ps2spr <Input file> <Output file> will convert <Input file> postscript to a RISC OS Sprite file called <Output file>. 
    ps2pdf <Input file> <Output file> will convert <Input file> postscript to a PDF file called <Output file>. 
    pdf2ps <Input file> <Output file> does the reverse. 
    ps2png <Input file> <Output file> will convert <Input file> to a PNG format file (24 bit colour, lossless compression). 
    ps2jpeg <Input file> <Output file> will convert postscript to JPEG
    ps2pcx <Input file> <Output file> will convert postscript to a PCX file, readable by !ChangeFSI. 
    ps2tiff <Input file> <Output file> will convert postscript to TIFF (uncompressed, 24bit colour). 
    ps2ps <Input file> <Output file> will 'distill' the input file, writing a new postscript file.
    You could use this to alter a file from PS Level 2 to PS Level 1 or just to make the postscript slightly more palatable to other software. 
    ps2eps <Input file> <Output file> will convert a one page document to correct EPS postscript.
    ps2epsi <Input file> <Output file> will add a preview image to a postscript (preferably EPS) file. 

    A great suggestion from Tim King for converting to PDF (replace ps2pdf below with any of the above for other formats):
    "In a task window type: ps2pdf; space; shift drag the ps file; space; type in the full address (and name) of what will be the pdf; return."
    This avoids having to set the current directory by dragging the file to the taskwindow with shift held, which inserts the full pathname of the file.

    To try other conversion you may find it useful to look at the aliases.

    Available devices, taken from the list output by entering gs -h: 
    spr spr1 spr8m sprm spr8c cljet5 cljet5c sgirgb st800 stcolor bmpmono
    bmpgray bmpsep1 bmpsep8 bmp16 bmp256 bmp16m bmp32b deskjet djet500
    djet500c laserjet ljetplus ljet2p ljet3 ljet3d ljet4 ljet4d lj5mono
    lj5gray cdeskjet cdjcolor cdjmono cdj550 pj pjxl pjxl300 uniprint bj10e
    bj200 bjc600 bjc800 faxg3 faxg32d faxg4 pcxmono pcxgray pcx16 pcx256
    pcx24b pbm pbmraw pgm pgmraw pgnm pgnmraw pnm pnmraw ppm ppmraw pkm
    pkmraw pksm pksmraw tiffcrle tiffg3 tiffg32d tiffg4 tifflzw tiffpack
    tiff12nc tiff24nc psmono psgray psrgb bit bitrgb bitcmyk pngmono pnggray
    png16 png256 png16m jpeg jpeggray pdfwrite bbox pswrite epswrite pxlmono
    pxlcolor epson eps9high eps9mid epsonc ibmpro lj250 nullpage


    Use of PSUtils

    The !PSUtils application is a frontend to all of the basic utilities, allowing setting of the options and drag and drop conversion. 

    Right clicking on the icon on the iconbar will switch between the currently active utility. Clicking select on the icon will open the configuration window for the active utility.
    The iconbar menu allows direct selection and configuration of all the utilities. 

    Dropping a postscript file on the icon will open up a standard save-as window. Enter a file name, or drag the icon somewhere suitable and the file conversion will take

    The utilities may also be used directly from the command line


    Supporting software

    People not using RISC OS 4, or not using the new F+ disc format of RISC OS 4, will require either:
    raFS by Richard Atterer: a filing system allowing long filenames and more than 77 files per directory.
    X-Files by Andy Armstrong: an image filing system for RISC OS. Directories in an X-Files image can contain any number of objects and each object can have a name of up to 256 characters.

    Ghostscript itself is used from the command line (a TaskWindow is fine) for those who want a more simple method there is:
    GView by Martin Würthner: a drag and drop RISC OS frontend for viewing PS files and saving pages as Sprites.
    PS2Pdf from Tim Nicholson: a drag and drop RISC OS frontend for converting PS files to Adobe PDF documents.

    Recent versions of !PDF, the PDF viewer for RISC OS do an excellent job of displaying output from Ghostscript.


    Mailing list

    An e-mail discussion list has been setup on for matters relating to Ghostscript or RISC OS. This should avoid the occasional hijacking of other lists for discussion of Ghostscript related matters. The list will also be used for announcements of updates and new versions if and when they happen.

    To subscribe send a blank message to

    To post messages send the mail to:

    To unsubscribe send a blank message to:


    Problems ....

    For problems specifically related to Ghostscript on RISC OS I suggest asking on the mailing list, or mail me, Graham Jones, and I may be able to help. Other sources of general information about Ghostscript include the comp.lang.postscript newsgroup or the official Ghostscript web sites listed above.