# GSview Readme

GSview 3.6 - PostScript previewer. Needs Ghostscript 6.
Release date: 2000-12-29

## Table of contents

- Overview
- Installation
- Compilation
- X11/Linux
- Bugs
- Updates
- Obtaining Ghostscript
- Copyright, Licensing and Registration
- Other Useful Programs
- Acknowledgements

## Overview

GSview is a graphical interface for Ghostscript under MS-Windows, OS/2 and Linux. Ghostscript is an interpreter for the PostScript page description language used by laser printers. For documents following the Adobe PostScript Document Structuring Conventions, GSview allows selected pages to be viewed or printed. GSview requires Ghostscript 4.03 - 6.99.

Features include:

- Display and print PostScript and PDF files.
- View pages in arbitrary order (Next, Previous, Goto).
- Page size and Orientation are automatically selected from DSC comments or can be selected using the menu.
- Print selected pages using Ghostscript.
- Convert pages to bitmap, PDF or PostScript.
- Selectable display resolution, depth, alpha.
- Single button zoom.
- Extract selected pages to another file.
- Copy display bitmap to clipboard.
- Save clipboard bitmap as BMP file.
- Add bitmap or user preview to EPS file (Interchange, TIFF or Windows Metafile)
- Graphically select and show bounding box for EPS file.
- Extract bitmap preview or PostScript from DOS EPS file.
- Extract text or search for text.
- Can read gzip and bzip2 compressed PostScript and PDF files.
- On-line help.
- Win32, OS/2 and Linux/X11 executables. Older versions support Win16.
- Can be run directly off a CD-ROM.
- English, German, French, Italian and Spanish languages.
- Per user initialisation files for Windows.
- Includes setup program.
- Free (Aladdin Free Public Licence).
- Works with Aladdin/AFPL Ghostscript 4.03 - 6.99 (GSview checks the Ghostscript version number).

Changes in version 3.6:

- Linux/X11 version.
- Measure works for OS/2.
- Windows setup prompts you to uninstall previous version of GSview.
- DSC parser updated.
- pstoedit updated.
- Bug fixes:
  - Reverse page order now works for printing.
  - pstoedit now converts the correct page.
  - Quotes correctly handled in Ghostscript options.
  - PStoEPS correctly calculates bounding box when EPSF clip used.
  - Handles DOS EPS files again.

GSview was written by Russell Lang at Ghostgum Software Pty Ltd.

## Installation

First uninstall any previous versions of GSview.

### Win32

Obtain GSview (gsv35w32.exe) from

> http://www.cs.wisc.edu/~ghost/gsview/get35.htm

Obtain AFPL Ghostscript 6.50 (gs650w32.exe) from

> http://www.cs.wisc.edu/~ghost/doc/AFPL/get650.htm

Install the AFPL Ghostscript self extracting archive gs650w32.exe (or a later version). Install the GSview self extracting archive gsv35w32.exe. Run GSview.

#### Win32 location details

By default, GSview is installed in the directory `c:\Ghostgum`, which creates the sub-directories `c:\Ghostgum\gsview`, `c:\Ghostgum\pstotext` and `c:\Ghostgum\pstoedit`. The GSview executable is `c:\Ghostgum\gsview\gsview32.exe`.

By default, AFPL Ghostscript is installed in the directory `c:\gs`, which creates the sub-directories `c:\gs\gsN.NN` and `c:\gs\fonts`. The AFPL Ghostscript executables are `c:\gs\gsN.NN\gswin32c.exe` for console mode and `c:\gs\gsN.NN\gswin32.exe` for windowing mode.

GSview normally locates AFPL Ghostscript using registry entries created by the AFPL Ghostscript setup program. If these do not exist, GSview will assume that Ghostscript is in an adjacent directory to GSview, usually `c:\Ghostgum\gsN.NN` and `c:\Ghostgum\fonts`.

### OS/2

Obtain GSview (gsv35os2.zip) from

> http://www.cs.wisc.edu/~ghost/gsview/get35.htm

Obtain AFPL Ghostscript 6.50 (gs650os2.zip) from

> http://www.cs.wisc.edu/~ghost/doc/AFPL/get650.htm

Unzip GSview to a temporary directory, place gs650os2.zip (or a later version) in the same directory, and then run os2setup.exe.

If you do not already have EMX installed on your system, you will also need to obtain the EMX Run Time library, emxrt.zip, from one of

> ftp://ftp-os2.cdrom.com/pub/os2/emx09d/emxrt.zip
> ftp://ftp-os2.nmsu.edu/pub/os2/dev/emx/v0.9d/emxrt.zip

If GSview refuses to run at all, make sure you do not have an old version of the emx DLL on your system.

GSview (gvpm.exe) will run under OS/2 2.1 and OS/2 Warp.

### Win16

Use the older GSview 2.7 and Aladdin Ghostscript 4.03.

### Win32s

For MS-Windows 3.1, it is recommended that you use the Win32 version. You must have Win32s installed before installing GSview. See http://www.microsoft.com/ or ftp://ftp.microsoft.com/softlib/mslfiles/PW1118.EXE. GSview and Ghostscript will not work with some versions of Win32s. If it doesn't work with your version, try updating to a later version of Win32s. Some computers will work with Win32s v1.15, others will not.

For Win32s, you will need to manually install both GSview and AFPL Ghostscript. The included setup programs will not run under Win32s. The self extracting archives can be unpacked with Info-ZIP unzip.

### X11/Linux

Copy `gsview`, `epstool` and `pstotext` to a directory on your search path. Copy `gvx*.htm` and `printer.ini` to `/usr/share/gsview`. GSview stores configuration information in `$HOME/.gsviewrc`.

### General

Make sure that the zip/exe files are transferred in binary mode.

The Ghostscript fonts are used by Ghostscript alone. Your system Fonts folder will not be modified.

If you don't like automatic installation programs, it is possible to install GSview and Ghostscript manually. For Ghostscript, read the file gsN.NN\doc\Install.htm. For GSview, read the file gsviewen.hlp

If you wish to use install GSview without any prompts, give a destination directory on the command line. For example:

> setup c:\ghostgum

This will not prompt for a destination directory and will overwrite files without asking.

Configuration of GSview will occur the first time it is run.

See the on-line help for more details. The 'Common Problems' topic is worth reading if GSview doesn't work.

## Compilation

To compile GSview for Windows you need MS Visual C++ 5.0 (and Borland C++ 4.5 for one 16-bit module). For MSVC++, copy gvwinvc.mak to Makefile, edit Makefile to set VCVER and DEVBASE as required, then type 'nmake'. Borland C++ 4.5 (for 16-bit code) and Borland C++Builder 4 will compile most of GSview, but you will need to hand modify some files. For Borland C++, copy gvwin.mak to Makefile, edit Makefile to set COMPBASE as required, then type 'make'.

To compile GSview for OS/2 you need IBM NMAKE.EXE and EMX/GCC 0.9d. To create the GSview online help you need the IBM toolkit. Copy gvpm.mak to Makefile and edit COMPBASE and EMXPATH as required. Type 'nmake'

To compile GSview for Linux/X11 you need gcc and the GTK+ 1.2 toolkit. Unzip the gsv35src.zip, to produce three other zip files. Unzip these, converting the line endings:
`unzip -a src.zip`
Change to the `src` subdirectory and copy `gvx.mak` to `makefile`. Run `make`. To install, run `make install` See the X11/Linux topic for more notes on X11 GSview.

## X11/Linux

While the current version number is 3.6, the Linux version really ought to be called 0.36.

X11 GSview is written by a novice at X Windows programming. It might have serious problems. The GTK+ toolkit is used for most of the graphical interface, with a small amount of Xlib for interfacing with Ghostscript.

### Unimplemented features

- Many accelerator keys don't work. The GtkItemFactory ignores some accelerators, including '+', '-', BackSpace, F1. Don't know how to add accelerators where there is no menu item. Don't know how to add multiple accelerators to the same menu item.
- Help uses HTML and netscape. Gnome Help Browser is not used because it doesn't support #topic on the command line. For example: gnome-help-browser file:/path/gsview.htm#Page_Size If you know of a way to tell the Gnome Help Browser to jump to a particular topic, particularly without opening another copy of the browser, please let me know.
- Keyboard movement between widgets
- Map scroll keys to scroll bars
- Convert to vector format
- Full screen not implemented
- Clipboard operations
- PDF links
- Sounds

### Known problems

- If you see each page as it is being drawn, then erased when it is finished, then you are probably using GS 6.50 which has a bug with the pixmap drawing method. Either change the drawing method to "Backing pixmap" or apply the fix described in bug #124957 on SourceForge.
- "Media | Display Settings | Draw Method" should be set to pixmap (the default) or backing pixmap. The setting backing storage doesn't work properly - it does draw, but my X server is ignoring the request to provide backing storage for the window. I don't know if other X servers will behave the same way.
- Fit window doesn't get the correct dimension of the scrolled window client area, so the resize is slightly wrong. At the moment we use the size of the scroll window less the two two scroll bars.
- GSview still includes lots of debugging code.

### Requests

Suggestions from GTK+ programmers about how to improve GSview.

Bug reports. Use "gsview -d9" to get debugging messages on stdout.

## Bugs

Send bug reports to Russell Lang at Ghostgum Software Pty Ltd, `gsview` at `ghostgum.com.au`. When reporting bugs, please include the version number and date of GSview (from the Help | About box), the version number of Ghostscript, and the exact wording of any error messages. The text in the "Ghostscript Messages" dialog can be copied to the clipboard and pasted as text (not bitmap please!) into an email message. Do not send me large files (>100k bytes) unless requested. If you get a SYS3175 or GPF, please send the address of the GPF - I can use this to help locate the bug. Please distinguish between bugs in GSview and bugs in Ghostscript, by making sure that the problem only occurs when using GSview, and not when using Ghostscript alone. Don't expect a fast response - the work I'm paid to do has a higher priority. For a list of known bugs, see http://www.cs.wisc.edu/~ghost/gsview/bugs.htm

## Updates

A World Wide Web home page for Ghostscript, Ghostview and GSview is at http://www.cs.wisc.edu/~ghost/

The latest version of GSview should be available from ftp://ftp.cs.wisc.edu/ghost/ghostgum/gsview*.zip or by mail (see next section) on a CD-ROM.

## Obtaining Ghostscript

Ghostscript can be downloaded from the Internet, or obtained on CD-ROM.

To download, go to the Ghostscript home page then follow the link to Obtaining AFPL Ghostscript.

To obtain the latest version of GSview and AFPL Ghostscript on CD-ROM, send the order form and payment to the address on the order form. Payment may be credit card or cheque for USD$50 drawn on a USA bank or equivalent drawn on your local bank. For surface delivery within Australia, send a cheque for AUD$70 drawn on an Australian bank.

The CD-ROM (actually a CD-R) will contain ready to run and ready to install copies of GSview and AFPL Ghostscript for Windows and OS/2, plus a number of other PostScript utilities. The CD-ROM will be dispatched by air-mail. This offer is valid until 30 June 2001. If this date has passed, send mail to `gsview` at `ghostgum.com.au`. to find out if the offer is still valid. For more details see the page http://www.ghostgum.com.au/cd.htm

## Copyright, Licensing and Registration

GSview is copyright by Ghostgum Software Pty Ltd. GSview is distributed with the Aladdin Free Public Licence. This licence is contained in the file LICENCE . The Aladdin Free Public Licence does not require any payment to the author; however the author would welcome any registrations of GSview to cover costs and time involved in developing and maintaining GSview.

The registration fee is currently AUD$40. GSview can be registered online at http://www.ghostgum.com.au/ or by faxing or mailing the registration form. Ghostgum Software prefers that you use the online registration.

The postal address for Ghostgum Software is:

> Russell Lang
> Ghostgum Software Pty Ltd
> 218 Gallaghers Rd
> GLEN WAVERLEY VIC 3150
> AUSTRALIA

GSview uses Ghostscript to display the contents of the PostScript files. Ghostscript is a separate program from GSview; it is written and owned by Aladdin Enterprises, not by Ghostgum Software Pty Ltd.

AFPL Ghostscript comes with a licence that is more restrictive than the GNU Licence; in particular, it restricts the distribution of AFPL Ghostscript in commercial contexts. Please see the file PUBLIC that accompanies AFPL Ghostscript for more details.

GSview uses pstotext in an external DLL. pstotext was written by Andrew Birrell and Paul McJones. It is Copyright (C) 1995-1996, Digital Equipment Corporation. See the licence in pstotext.txt or pstotext.zip for more details. If you do not agree to the pstotext licence, delete pstotext.zip, pstotxt2.dll and pstotxt3.dll. See http://www.research.digital.com/SRC/virtualpaper/pstotext.html

GSview can convert PostScript or PDF file to an editable vector using pstoedit in an external DLL. pstoedit is Copyright by Wolfgang Glunz and is licensed with the GNU Public Licence (GPL). Binaries are included in GSview with the permission of Wolfgang Glunz. The home page of pstoedit is http://www.geocities.com/SiliconValley/Network/1958/pstoedit/ . Source code can be obtained from this site. The manual for pstoedit is included with GSview.

GSview uses zlib 1.0.4 in an external DLL. zlib is Copyright (C) 1995-1996 Jean-loup Gailly and Mark Adler. See http://www.info-zip.org/pub/infozip/zlib/

GSview uses bzip2 in an external DLL. bzip2 is Copyright 1996-2000 by Julian Seward. See http://sourceware.cygnus.com/bzip2/index.html

The installation programs may use an unzip decompression library (DLL) by the Info-ZIP group. The original sources are freely available from ftp://ftp.freesoftware.com/pub/infozip/

## Other Useful Programs

GSPRINT is a command line tool for printing using Windows GDI printer drivers.

EPSTOOL is a command line tool for adding and removing previews from EPS files.

## Acknowledgements

L. Peter Deutsch, for writing Ghostscript and for making changes to Ghostscript to support GSview.

Tim Theisen, who wrote Ghostview for X11 which provided the inspiration for GSview.

Paul McJones and Andrew Birrell of DEC, for making pstotext available and making changes to it for use with GSview.

Thomas Pfeiffer and Mrs. Stefanie Kolweyh for translating GSview into German/Deutsch.

Cyrille Chevallet for translating GSview into French/Français.

Antonio Guadagnin for translating GSview into Italian/Italiano.

Pascual Lucas for translating GSview into Spanish/Español.

## End of Readme