-->
Previous | Table of Contents | Next |
Ghostview is a utility to display PostScript files on the screen. Ghostview was written by Tim Theisen, not by Aladdin Enterprises, and is freely available on the Internet and through CD-ROM collections. Ghostview uses Ghostscript to display the contents, but doesnt require Ghostscript to be installed first.
The Ghostview utility is easy to run. To display the contents of the file chapter1.ps on your X screen, you would issue the command:
ghostview chapter1.ps
Most users learn to rename or alias the ghostview command to something a lot shorter, such as gv, to make using it easier and faster to type. To alias the command ghostview to gv in the tcsh shell, for example, simply enter:
alias gv ghostview
Ghostviews main window is a little more involved than the simple output window Ghostscript displays. The Ghostview main window is shown in Figure 24.5.
Figure 24.5. The Ghostview main window shows the file being displayed by navigation shortcuts.
The Ghostview Panel
As you can see, the file youre displaying is in the right-hand page of the window just as it would appear using Ghostscript (which is actually what happens as Ghostview calls Ghostscript for this part of the routine). The scroll bar in the right margin lets you move through the file quickly, or you can use the page numbers on the left to move quickly to any page.
There are five buttons in the left-hand panel:
Youll find Ghostview quick and easy to work with after using it a couple of times. The top of the Ghostview window shows the version number, and the top of the left panel shows the title (if any) of the document you are displaying (PostScript allows document titles to be embedded in the page descriptor language). If no title is found, the file name is shown instead. The date underneath the title is either a date embedded in the PostScript file or the files modification date.
Tip:
One feature of Ghostview that may have you puzzled for a moment is the way pages are displayed after being minimized and expanded. When you shrink a Ghostview window to its icon, Ghostview retains all the images of the files in memory. However, when you expand the window, Ghostview first checks to see whether the file has been changed since the minimization. This can cause a slight delay in the window appearing again, especially with very large documents. Despite the delay, this is a very useful featureit means you always have the most recent version of the document displayed.
Despite the simple look of the Ghostview window, there are a huge number of options the command supports. They tend to replace either X resources or environment variable options explained in the Ghostview documentation.
Ghostview Fonts
By default Ghostview comes with a set of PostScript type 1 and 3 fonts, which should cover every document youre likely to run into. However, you can add your own fonts to Ghostviews arsenal. The fonts need to be placed in the Ghostscript fonts subdirectory, such as /usr/share/ghostscript/3.33/fonts.
You also have to edit the file Fontmap to tell Ghostview and Ghostscript about the new fonts. The format of each entry in Fontmap is simple, showing the name of the font and the file that contains it, such as the following, where funnyfont is the name of the font and fun_fnt.pfb is the PostScript definition file:
funnyfont (fun_fnt.pfb);
Previous | Table of Contents | Next |