# GSview Readme

GSview 5.0 PostScript previewer. Needs Ghostscript 7.04 or later.
Release date: 2012-01-17

## Table of contents

- Overview
- Installation
- Compilation
- X11/Unix
- 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 Unix. 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 7.04 - 9.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.
- Win64, Win32. Older versions support GNU/Linux, OS/2 and Win16.
- Can be run directly off a CD-ROM or USB memory stick (Portable Application).
- English, Catalan, Dutch, French, German, Greek, Italian, Russian, Slovak, Spanish and Swedish languages.
- Per user initialisation files for Windows.
- Includes setup program.
- Free (Aladdin Free Public Licence).
- Works with Ghostscript 7.04 - 9.99 (GSview checks the Ghostscript version number). Some older versions of GSview will work with Ghostscript 4.03 - 6.99.

Changes in version 5.0:

- Minor bug fixes.
- Help file updated to work on Windows 7.
- Saving registration number fix on Windows 7.
- Non-English languages work on 64-bit Windows.
- GNU/Linux code has been removed while it is being updated to the current version of gtk+.

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

## Installation

First uninstall any previous versions of GSview.

### Win32

Obtain GSview (gsv50w32.exe) from

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

Obtain GPL Ghostscript 9.02 (gs902w32.exe) from

> http://www.cs.wisc.edu/~ghost/doc/GPL/gpl902.htm

First install the GPL Ghostscript self extracting archive gs902w32.exe (or a later version if available) Then install the GSview self extracting archive gsv50w32.exe. Run GSview.

#### Win32 location details

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

By default, GPL Ghostscript is installed in the directory `c:\gs`, which creates the sub-directories `c:\gs\gsN.NN` and `c:\gs\fonts`. The GPL 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 GPL Ghostscript using registry entries created by the GPL Ghostscript setup program. If these do not exist, GSview will assume that Ghostscript is in an adjacent directory to GSview, usually `c:\Program Files\Ghostgum\gsN.NN` and `c:\Program Files\Ghostgum\fonts`.

### Win64 (AMD64)

Obtain GSview (gsv50w64.exe) from

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

First install the GPL Ghostscript self extracting archive gs902w64.exe (or a later version if available) Then install the GSview self extracting archive gsv50w64.exe. Run GSview.

This version requires that you have a 64-bit x64 processor (AMD64 or EM64T), and that you are also running a 64-bit version of Windows such as Windows XP x64 Edition. It will not run on the more common 32-bit Windows XP.

### OS/2

Obtain GSview (gsv49os2.zip) from

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

Obtain GPL Ghostscript 8.60 (gs860os2.zip) from

> http://www.cs.wisc.edu/~ghost/doc/GPL/gpl860.htm

Unzip GSview to a temporary directory, change to the gsview2 subdirectory, place gs860os2.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.

### X11/Unix

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

You must have the shared object version of Ghostscript 7.04 - 9.19, which should be included in recent GNU/Linux distributions. If you don't have the ghostscript shared object, you must first install Ghostscript, then the additional shared object files. To build the ghostscript shared object files, use '`./configure ; make so`'

A precompiled version is available for GNU/Linux. GSview can also be compiled for SunOS and SGI IRIX.

### 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:\Program Files\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, 6, 7, 7.1, 8 or 9. Copy srcwin/win.mak to Makefile, edit Makefile to set `VCVER` and `DEVBASE` as required, then type '`nmake`'. To build for Win64 use '`nmake VCVER=71 WIN64=1`'

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 srcos2/os2.mak to Makefile and edit COMPBASE and EMXPATH as required. Type 'nmake'

To compile GSview for X11/Unix you need gcc and the GTK+ 1.2 toolkit. Unzip the sources as follows to convert the line endings:

      unzip -aa gsv49src.zip
      unzip -o gsv49src.zip "gsview-4.9/binary/*"
      cd gsview-4.9
      cp srcunx/unx.mak Makefile
      make

GSview may also be available in a tar.gz file which already has Unix line endings. To install, run `make install` See the X11/Unix topic for more notes on X11 GSview. For SunOS or SGI IRIX, uncomment the appropriate lines in the makefile. You also be able to use

      rpmbuild -ta gsview-4.9.tar.gz

## X11/Unix

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 very small amount of Xlib.

GSview on Unix uses the Ghostscript shared object. Drawing (especially over a network when using anti-aliased text) should be faster.

### Unimplemented features

- 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
- Full screen not implemented
- Clipboard operations
- Sounds

### Known problems

- 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 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://mirror.cs.wisc.edu/pub/mirrors/ghost/ghostgum/gsview*.zip

## Obtaining Ghostscript

Ghostscript can be downloaded from the Internet.

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

## 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 .

This 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. On registration you will be sent a registration code to disable the nag screen.

The postal address for Ghostgum Software is:

> Russell Lang
> Ghostgum Software Pty Ltd
> 25 Kennedy St
> 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 owned by Artifex Software Inc., not by Ghostgum Software Pty Ltd.

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). pstoedit is not included with GSview. You will need to obtain pstoedit separately from the pstoedit homepage http://www.pstoedit.net/pstoedit or from http://www.cs.wisc.edu/~ghost/gsview/pstoedit.htm . Source code can be obtained from these sites.

GSview uses zlib 1.2.3 in an external DLL. zlib is Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler. See http://www.zlib.net/

GSview uses bzip2 in an external DLL. bzip2 is Copyright 1996-2006 by Julian Seward. See http://sources.redhat.com/bzip2/

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

## Other Useful Programs

GSPRINT is a command line tool for printing using Windows GDI printer drivers. This is included with GSview.

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. Thomas Hoffmann for updates.

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.

Stamos Mylonas for translating GSview into Greek/Ellenika.

Kris Steenhaut for translating GSview into Dutch/Nederlands.

Oleg Bondar for translating GSview into Russian.

Björn Söderström for translating GSview into Swedish/Svenska.

Juo Verut for translating GSview into Slovak.

## End of Readme