.TH ghostview "" "" "X Application"
.PC "View PostScript documents using ghostscript"
\fBghostview [\fIoptions\^\fB] [\fIfilename\^\fB]\fR
.PP
.HS
.SH Options:
[\-staticgray]
[\-grayscale]
[\-staticcolor]
[\-pseudocolor]
[\-truecolor]
[\-directcolor]
[\-[no]install]
[\-[no]private]
[\-[no]center]
[\-[no]title]
[\-[no]date]
[\-[no]locator]
[\-[no]labels]
[\-resolution\ \fIdpi\fP] [\-dpi\ \fIdpi\fP]
[\-xdpi\ \fIdpi\fP]
[\-ydpi\ \fIdpi\fP]
[\-[no]quiet]
[\-preload\ \fIfile\fP]
[\-magstep\ \fIn\fP]
[\-portrait]
[\-landscape]
[\-upsidedown]
[\-seascape]
[\-letter]
[\-tabloid]
[\-ledger]
[\-legal]
[\-statement]
[\-executive]
[\-a3]
[\-a4]
[\-a5]
[\-b4]
[\-b5]
[\-folio]
[\-quarto]
[\-10x14]
[\-force]
[\-forceorientation]
[\-forcemedia]
[\-[no]swap]
[\-[no]openwindows]
[\-[no]ncdwm]
[\-page \fIlabel\fP]
[\-\fItoolkitoption\fR\ ...]
[filename]
.HE
.B ghostview
provides an interactive interface to the
.B ghostscript
interpreter.
.B ghostview
and
.B ghostscript
function as two cooperating programs.
.B ghostview
creates the viewing window and
.B ghostscript
draws in it.
.PP
Please do not be alarmed by the number of options.
Generally, one invokes
.B ghostview
with just one parameter, the name of the file to be previewed.
If the filename is `-',
.B ghostview
reads
.BR stdin .
The options provide a way to set X resources from
the command line for a single invocation of
.BR ghostview .
For that reason, this manual page discusses
options after it discusses resources.
.SH "Main Window"
When you invoke
.BR ghostview ,
its window appears as follows:
.PH 1 1 \\*(XD/ghostview.eps
.PP
The viewport, which takes up the bulk of the window,
here shows one of the capital letters from the Paris Book of Hours
that is used in the \*(CO Lexicon.
(For information on how to obtain copies of these images, which are
in encapsulated PostScript format, see the copyright page to the
\*(CO manual.)
Also shown is the same image magnified in a ``zoom box''.
As the page being displayed is larger than the viewport,
scroll bars appear along the bottom and right edges of the viewport;
by clicking on those bars, you can shift viewport around the page.
.PP
To the left of the viewport is the table of contents.
If the PostScript file has document structuring convention (DSC) comments,
the table of context displays the page labels (i.e., usually page numbers).
To the left of the table of contents is the menu box.
Each push button brings up a pop-up menu.
Over the menu box and table of contents there are three optional labels
that contain the title, date, and locator.
.PP
The title label contains the document title found in the DSC comments.
If no title can be found, the file name is used in its place.
The date label contains the document date found in the DSC comments.
If no date can be found, the last modified date of the file is
used in its place.
Because the title and date labels may be clipped by the main viewport,
the date and title labels are push buttons that bring up a pop-up window
with the title or date.
These pop-up windows also show the
.B document
icon when the displayed string comes from the DSC comments.
The locator shows the location of the cursor in the viewport.
The location is expressed in the default user coordinate system.
The locator is useful for measuring bounding boxes.
.PP
Within the main viewport the mouse cursor is a ``target'' when
.B ghostscript
is doing work.
The cursor is a ``cross hair'' when
.B ghostscript
is idle.
When moving to another page in a document, it is generally best to wait for
.B ghostscript
to become idle.
Otherwise, the current
.B ghostscript
process must be killed and the overhead of reading the prologue
incurred again.
.PP
Before it displays a page or when the application is deiconified,
.B ghostview
checks whether the file has been modified.
If the file has changed, it reopens the file.
.PP
Clicking anywhere within the viewport will pop-up a zoom window.
The window is centered about the location that was clicked.
Clicking with the first mouse button pops up a low resolution zoom window.
Clicking with the second mouse button pops up a medium resolution zoom window.
Clicking with the third mouse button pops up a high resolution zoom window.
The cursor in the zoom window will display a ``target'' or ``cross hair''
depending on the state of
.BR ghostscript .
The locator reports the position of the cursor in the zoom windows
as well as the main viewport.
.PP
In the table of contents, the first and third mouse button functions exactly
as they do in a Text widget.
That is the first mouse button selects text and the third mouse button
extends selections.
However, clicking on a page label with the second mouse button cause
that page to be shown.
The page being displayed is marked with a `<' in the right margin of
the table of contents.
.SH "Pop\-up Windows"
Any of several additional windows may appear.
.PP
The
.B copyright
window appears whenever copyright information is requested.
The
.B information
window appears whenever the
.B ghostscript
process writes to
.B stdout
or
.BR stderr .
.PP
Whenever there is an error in the PostScript program, the stack trace will
appear in this window.
When
.B ghostscript
is invoked without the quiet option,
informational message regarding the state of
.B ghostscript
appears in the
.B information
window.
.PP
To dismiss the
.B copyright
or
.B information
windows, click the
.K Dismiss
button.
.PP
The
.B "Select File"
dialogue widget appears when you wish to open or save a file.
This widget lets you select a file by typing its path
or by browsing in directory listings and selecting entries with the mouse.
.PP
The space bar can be pressed to complete file names,
and tilde `~' is used for home directories.
All the usual key bindings can be used in the text widget,
except for \*(RT and
.BR <ctrl-M> ,
which are equivalent to clicking the
.K OK
button.
The path can be scrolled using the large horizontal scroll bar,
or by moving the insertion cursor in the text widget.
The directory entries can be scrolled using the vertical scroll bars,
or by holding a mouse button down and moving out of the listing.
The scrolling speed varies with the distance from the listing.
The directory entries are terminated with special characters that show the
type of entry.
.PP
The
.B "Select File"
dialogue widget is in total control until is pops down.
No other control in
.B ghostview
is active during this time.
.SH Menus
The menu box contains five buttons, which are respectively labelled
.Kr File ,
.Kr Page ,
.Kr Magstep ,
.Kr Orientation ,
and
.Kr Media .
There are keyboard accelerators for most of the pop-up menus.
These are described below.
.IP \fBFile\fR 1.0i
This pop-up menu appears when you click the
.K File
button that appears on the left of the main
.B ghostview
window.
This menu controls file access
It contains the following entries:
.RS
.IP "\fBOpen...\fR" 1.0i
Open the file for viewing.
.B ghostview
pops up the
.B "Select File"
window in preparation to open a file.
This widget is in total control until it pops down.
.IP "\fBReopen\fR"
Reopen the currently selected file.
.IP "\fBPrint...\fR"
This sends the entire document to the printer.
.B ghostview
pops up a dialogue widget to ask for the printer's name.
.IP "\fBPrint marked pages...\fR"
Send the marked pages to the printer.
.B ghostview
pops up a dialogue widget to ask for the printer's name.
If you have not marked any pages,
.B ghostview
invokes the mark procedure before printing,
then invokes the unmark procedure after printing.
.IP "\fBSave marked pages...\fR"
Save the marked pages in the selected file.
.B ghostview
pops up the
.B "Select File"
window to save a file.
This widget is in total control until it pops down.
If you have not marked any pages,
.B ghostview
invokes the mark procedure before saving,
then invokes the unmark procedure after saving.
.IP "\fBCopyright...\fR"
Pop up the
.B Copyright
window.
.IP "\fBQuit\fR"
Exit
.BR ghostview .
.RE
.IP \fBPage\fR
This menu appears when you click the
.K Page
button 
button that appears on the left of the main
.B ghostview
window.
This window controls page access.
It contains the following entries:
.RS
.IP "\fBNext\fR" 1.0i
Display the next page.
.IP "\fBRedisplay\fR"
Display the current page.
.IP "\fBPrevious\fR"
Display the previous page.
.IP "\fBCenter\fR"
Center the page in the viewport.
.IP "\fBMark\fR"
Mark the pages that have been selected in the table of contents.
If no pages have been selected, mark the current page.
.IP "\fBUnmark\fR"
Unmark the pages that have been selected in the table of contents.
If no pages have been selected, unmark the current page.
.RE
.IP \fBMagstep\fR
This template appears when you click the button labelled
.K Magstep
on the left of
.BR ghostview 's
main window.
With it, you can control the magnification at which the document is viewed.
.IP
.B ghostview
borrows the notion of magstep from TeX.
The magnification is defined to be 1.2\(mumagstep.
At magstep 1, the document is magnified by 1.2.
At magstep \-1, the document is reduced by 1.2.
.IP
The
.B Magstep
menu lists values from \-5 to five.
The default magstep of zero implies no magnification (i.e., the size on
the screen should match that size on paper).
.IP \fBOrientation\fR
This template appears when you click the button labelled
.K Orientation
on the left side of
.BR ghostview 's
main window.
With it, you can control the orientation of the display.
A bullet marks the current orientation.
.IP
To select a new orientation, use the left-mouse button to click its button.
Note that the DSC comments can specify an orientation of Portrait or
Landscape that overrides the default;
in this case, a ``document'' appears before the current orientation.
You can use the center-mouse button to force the orientation on
a document to override the DSC comments.
If an orientation is being forced, then a ``tie fighter'' appears before
front of the current orientation.
.IP
The
.B Orientation
menu contains the following entries:
.RS
.IP "\fBPortrait\fR" 1.0i
Use portrait orientation.
This implies no rotation.
A portrait orientation indicates that the longest edge of the paper
is parallel to the vertical (Y) axis.
.IP "\fBLandscape\fR"
Use landscape orientation.
A landscape orientation indicates that the longest edge
of the paper is parallel to the horizontal (X) axis.
.B ghostview
rotates the image clockwise by 90\(de.
.IP "\fBUpside\-Down\fR"
Set orientation to Upside\-Down.
This does as its name implies:
.B ghostview
rotates the image by 180\(de.
.IP "\fBSeascape\fR"
Set the orientation to Seascape.
.B ghostview
rotates the image counterclockwise by 90\(de.
.IP "\fBSwap Landscape\fR"
Swap the meaning of ``landscape'' and ``seascape''.
Most of the landscape documents require a 90\(de rotation clockwise;
however, there is no standard and some documents must be rotated
counterclockwise.
This buttons lets
.B ghostview
automatically to rotate the document correctly in response to the
.B %%Orientation
comment in the PostScript file.
.RE
.IP \fBMedia\fR
The entries on the
.B Media
menu set the page's \fImedium\fR \(em that is, the dimensions of the
sheet of paper onto which it is to be printed.
The medium defined in the document appears at the beginning of the menu
separated by a line from the standard media.
A bullet marks the current medium.
.IP
To set the default medium, use the left-mouse button to click on its
menu entry.
The DSC comments may specify a page medium that overrides the default.
In this case, a ``document'' appears before the current medium.
You can use the center-mouse button to force the medium on
a document to override the DSC comments.
Forcing the medium on an encapsulated PostScript
figure overrides the Bounding Box;
this makes is easy to view a figure whose
.B %%BoundingBox
comment is incorrect.
If you force a medium, then a ``tie fighter'' appear
in front of the current medium.
.IP
The following gives the names and sizes of the standard media.
Note that there are 72 points per inch:
.DS
.ie t .ta 1.5i 3.0i
.el   .ta 1.5i 4.0i
\fIName	Size, Points	Size, Inches
\fBLetter\fR	612\(mu792	8.5\(mu11
\fBTabloid\fR	792\(mu1224	11\(mu17
\fBLedger\fR	1224\(mu792	17 \(mu11
\fBLegal\fR	612\(mu1008	8.5\(mu14
\fBStatement\fR	396\(mu612	5.5\(mu8.5
\fBExecutive\fR	540\(mu720	7.5\(mu10
\fBA3\fR	842\(mu1190
\fBA4\fR	595\(mu842
\fBA5\fR	420\(mu595
\fBB4\fR	729\(mu1032
\fBB5\fR	516\(mu729
\fBFolio\fR	612\(mu936	8.5\(mu13
\fBQuarto\fR	610\(mu780
\fB10x14\fR	720\(mu1008	10 \(mu14
.DE
.SH "Keyboard Accelerators"
You can use keystrokes to invoke most of the commands that appear
on the pop-up menus.
The menu entry must be sensitive (i.e., not grayed out)
for the action to have effect.
The following gives the default keyboard bindings:
.IP \fBQ\fR 0.3i
This key is bound to
.BR GhostviewQuit() ,
which is equivalent to clicking the entry
.B Quit
on the menu
.BR File .
.IP \fBO\fR
This key is bound to
.BR GhostviewOpen() ,
which is equivalent to clicking the entry
.B Open...
on the menu
.BR File .
.IP \fBR\fR
This key is bound to
.BR GhostviewReopen() ,
which is equivalent to clicking the entry
.B Reopen
on the menu
.BR File .
.IP \fBS\fR
This key is bound to
.BR GhostviewSave() ,
which is equivalent to clicking the entry
.B "Save marked pages..."
on the menu
.BR File .
.IP \fBP\fR
This key is bound to
.BR GhostviewPrintMarked() ,
which is equivalent to clicking the entry
.B "Print marked pages..."
on the menu
.BR File .
.IP \fBShift\-P\fR
This key is bound to
.BR GhostviewPrintWhole() ,
which is equivalent to clicking the entry
.B Print...
on the menu
.BR File .
.IP "\fK(Backspace)\fR, \fK(Del)\fR, \fBB\fR"
These keys are bound to
.BR GhostviewPrevious() ,
which is equivalent to clicking the entry
.B Previous
on the menu
.BR Page .
.IP "\fK(space)\fR, \*(RT, \fK(Next)\fR, \fBF\fR"
These keys are bound to
.BR GhostviewNext() ,
which is equivalent to clicking the menu entry
.B Next
on the menu
.BR Page .
.IP "\fB.\fR, \fB<ctrl\-L>\fR"
These keys are bound to
.BR GhostviewShow() ,
which is equivalent to clicking the entry
.B Redisplay
on the menu
.BR Page .
.IP \fBM\fR
This key is bound to
.BR GhostviewMark() ,
which is equivalent to clicking the entry
.B Mark
on the menu
.BR Page .
.IP \fBN\fR
This key is bound to
.BR GhostviewUnMark() ,
which is equivalent to clicking the entry
.B Unmark
menu button on the menu
.BR Page .
.IP \fB0\fR
This key is bound to
.BR GhostviewMagstep(0) ,
which is equivalent to clicking the entry
.B 0
on the menu
.BR Magstep .
.IP \fB1\fR
This key is bound to
.BR GhostviewMagstep(1) ,
which is equivalent to clicking the entry
.B 1
on the menu
.BR Magstep .
.IP \fB2\fR
This key is bound to
.BR GhostviewMagstep(2) ,
which is equivalent to clicking the entry
.B 2
on the menu
.BR Magstep .
.IP \fB3\fR
This key is bound to
.BR GhostviewMagstep(3) ,
which is equivalent to clicking the entry
.B 3
on the menu
.BR Magstep .
.IP \fB4\fR
This key is bound to
.BR GhostviewMagstep(4) ,
which is equivalent to clicking the entry
.B 4
on the menu
.BR Magstep .
.IP \fB5\fR
This key is bound to
.B GhostviewMagstep(5)
which is equivalent to clicking the entry
.B 5
on the menu
.BR Magstep .
.IP \fB+\fR
This key is bound to
.B GhostviewIncreaseMagstep() ,
which increases the magstep by one.
.IP \fB-\fR
This key is bound to
.BR GhostviewDecreaseMagstep() ,
which decreases the magstep by one.
.IP \fBU\fR
This key is bound to
.BR GhostviewUp() ,
which scrolls the main viewport up.
.IP \fBD\fR
This key is bound to
.BR GhostviewDown() ,
which scrolls the main viewport down.
.IP \fBH\fR
This key is bound to
.BR GhostviewLeft() ,
which scrolls the main viewport left.
.IP \fBJ\fR
This key is bound to
.BR GhostviewDown() ,
which scrolls the main viewport down.
.IP \fBK\fR
This key is bound to
.BR GhostviewUp() ,
which scrolls the main viewport up.
.IP \fBL\fR
This key is bound to
.BR GhostviewRight() ,
which scrolls the main viewport right.
.IP "\*(UA"
This key is bound to
.B GhostviewDefault()
.BR GhostviewSetOrientation(portrait) ,
which is equivalent to clicking the entry
.B Portrait
with the left-mouse button on the menu
.BR Orientation .
.IP "\*(RA"
This key is bound to
.B GhostviewDefault()
.BR GhostviewSetOrientation(landscape) ,
which is equivalent to clicking the entry
.B Landscape
with the left-mouse button on the menu
.BR Orientation .
.IP "\*(DA"
This key is bound to
.B GhostviewDefault()
.BR GhostviewSetOrientation(upside\-down) ,
which is equivalent to clicking the entry
.B Upside\-down
with the left-mouse button on the menu
.BR Orientation .
.IP "\*(LA"
This key is bound to
.B GhostviewDefault()
.BR GhostviewSetOrientation(seascape) ,
which is equivalent to clicking the entry
.B Seascape
with the left-mouse button on the menu
.BR Orientation .
.IP "\fB<shift>\fR\-\*(UA"
This key combination is bound to
.B GhostviewForce()
.BR GhostviewSetOrientation(portrait) ,
which is equivalent to clicking the entry
.B Portrait
with the center-mouse button on the menu
.BR Orientation .
.IP "\fB<shift>\fR\-\*(RA"
This key combination is bound to
.B GhostviewForce()
.BR GhostviewSetOrientation(landscape) ,
which is equivalent to clicking the entry
.B Landscape
with the center-mouse button on the menu
.BR Orientation .
.IP "\fB<shift>\fR\-\*(DA"
This key combination is bound to
.B GhostviewForce()
.BR GhostviewSetOrientation(upside\-down) ,
which is equivalent to clicking the entry
.B Upside\-down
with the center-mouse button on the menu
.BR Orientation .
.IP "\fB<shift>\fR\-\*(LA"
This key combination is bound to
.B GhostviewForce()
.BR GhostviewSetOrientation(seascape) ,
which is equivalent to clicking the entry
.B Seascape
with the center-mouse button on the menu
.BR Orientation .
.SH Actions
Most of the pop-up menu's commands have an equivalent action that you can
use in a translation.
The pop-up menu entry must be sensitive (i.e., not grayed out)
for the action to have effect.
.B ghostview
recognizes the following actions:
.IP \fBGhostviewCopyright()\fR
Equivalent to clicking the entry
.B Copyright...
on the menu
.BR Ghostview .
.IP \fBGhostviewQuit()\fR
Equivalent to clicking the entry
.B Quit
on the menu
.BR Ghostview .
.IP \fBGhostviewOpen()\fR
Equivalent to clicking the entry
.B Open...
on the menu
.BR File .
.IP \fBGhostviewReopen()\fR
Equivalent to clicking the entry
.B Reopen
on the menu
.BR File .
.IP \fBGhostviewSave()\fR
Equivalent to clicking the entry
.B "Save marked pages..."
on the menu
.BR File .
.IP \fBGhostviewPrintWhole()\fR
Equivalent to clicking the entry
.B Print...
on the menu
.BR File .
.IP \fBGhostviewPrintMarked()\fR
Equivalent to clicking the entry
.B "Print marked pages..."
on the menu
.BR File .
.IP \fBGhostviewPrevious()\fR
Equivalent to clicking the entry
.B Previous
on the menu
.BR Page .
.IP \fBGhostviewShow()\fR
Equivalent to clicking the entry
.B Redisplay
on the menu
.BR Page .
.IP \fBGhostviewNext()\fR
Equivalent to clicking the entry
.B Next
on the menu
.BR Page .
.IP \fBGhostviewCenter()\fR
Equivalent to clicking the entry
.B Center
on the menu
.BR Page .
.IP \fBGhostviewMark()\fR
Equivalent to clicking the entry
.B Mark
on the menu
.BR Page .
.IP \fBGhostviewUnmark()\fR
Equivalent to clicking the entry
.B Unmark
on the menu
.BR Page .
.IP \fBGhostviewSetMagstep(\fIvalue\^\fB)\fR
Set the magstep to
.IR value .
The parameter must be an integer.
.IP \fBGhostviewIncreaseMagstep()\fR
Increase the magstep by one.
.IP \fBGhostviewDecreaseMagstep()\fR
Decrease the magstep by one.
.IP \fBGhostviewSetOrientation(\fIvalue\^\fB)\fR
Set the orientation to
.IR value ,
which must be
.BR portrait ,
.BR landscape ,
.BR upside\-down ,
or
.BR seascape .
.IP \fBGhostviewSwapLandscape()\fR
Equivalent to clicking the entry
.B "Swap Landscape"
on the menu
.BR Orientation .
.IP \fBGhostviewSetPageMedia(\fIname\^\fB)\fR
Set the medium to
.IR name ,
which must either be defined in the document or a standard medium.
.IP \fBGhostviewDefault()\fR
The orientation or medium being set is not forced on the document.
Call this action before the action that sets the orientation or medium.
.IP \fBGhostviewForce()\fR
The orientation or medium being set is forced on the document.
Call this action before the action that sets the orientation or media.
.IP \fBGhostviewDeleteWindow()\fR
Destroy the current window.
This provides a way to implement the Delete Window protocol
for window managers.
.IP \fBGhostviewDismiss()\fR
Close the current window.
This provides a way to implement the Delete Window protocol for window managers.
.IP \fBGhostviewScrollUp()\fR
Scroll the main viewport up.
.IP \fBGhostviewScrollDown()\fR
Scroll the main viewport down.
.IP \fBGhostviewScrollLeft()\fR
Scroll the main viewport left.
.IP \fBGhostviewScrollRight()\fR
Scroll the main viewport right.
.IP \fBGhostviewEraseLocator()\fR
Used to erase the locator when leaving a Ghostview widget.
.IP \fBGhostviewCheckFile()\fR
Checks to see if the file changed and refreshes the screen if necessary.
.SH "Application Resources"
You can set any of the following resources to alter
.BR ghostview 's
default behaviors:
.IP "\fBshowTitle (\fRclass\fB Labels)\fR"
Display the comment
.BR %%Title .
The default is
.BR true .
.IP "\fBshowDate (\fRclass\fB Labels)\fR"
Display the comment
.BR %%Data .
The default is
.BR true .
.IP "\fBshowLocator (\fRclass\fB Labels)\fR"
Display the locator.
The default is
.BR true .
.IP "\fBinstallStdCmap (\fRclass\fB InstallStdCmap)\fR"
Attempt to install a standard color map.
The default is
.BR false .
.IP "\fBprivateCmap (\fRclass\fB PrivateCmap)\fR"
Use a standard color map that is not the default color map.
The default is
.BR false .
.IP "\fBautoCenter (\fRclass\fB AutoCenter)\fR"
Center the page within the viewport
whenever the page size changes.
The default is
.BR true .
.IP "\fBhorizonalMargin (\fRclass\fB Margin)\fR"
Set the number of pixels
.B ghostview
should reserve for window decorations in the horizontal direction.
The default value is 20.
.IP "\fBverticalMargin (\fRclass\fB Margin)\fR"
Set the number of pixels
.B ghostview
should reserve for window decorations in the vertical direction.
The default value is 44.
.IP "\fBminimumMagstep (\fRclass\fB Magstep)\fR"
Set the smallest magstep to display.
The default is \-5.
.IP "\fBmaximumMagstep (\fRclass\fB Magstep)\fR"
Set the largest magstep to display.
The default is five.
.IP "\fBmagstep (\fRclass\fB Magstep)\fR"
Set the default magstep.
The default is zero.
.IP "\fBorientation (\fRclass\fB Orientation)\fR"
Set the default orientation.
The default is
.BR Portrait .
.IP "\fBpage (\fRclass\fB Page)\fR"
Give the initial page to display.
This resource only affects the display of the file you name on the command line.
The default is NULL.
.IP "\fBpageMedia (\fRclass\fB PageMedia)\fR"
Set the default page medium.
The default is
.BR Letter .
.IP "\fBforceOrientation (\fRclass\fB Force)\fR"
Force the orientation on the document.
The default is
.BR false .
.IP "\fBforcePageMedia (\fRclass\fB Force)\fR"
Force the page medium on the document.
The default is
.BR false .
.IP "\fBswapLandscape (\fRclass\fB SwapLandscape)\fR"
Swap the meaning of
.B Landscape
and
.BR Seascape .
The default is
.BR false .
.IP "\fBprintCommand (\fRclass\fB PrintCommand)\fR"
Set the command used for printing.
.B ghostview
sets the environmental variable
.B LPSCHED
to the desired printer, then invokes
.BR popen()
to execute this command.
This command should read from
.BR stdin .
The default value is
.BR lp .
.IP "\fBprinterVariable (\fRclass\fB PrinterVariable)\fR"
Name the environment variable that names the printer to use.
The default is
.BR LPDEST .
.IP "\fBdefaultPrinter (\fRclass\fB DefaultPrinter)\fR"
Name the printer to use when the printer environment variable is not set.
The default is NULL.
.IP "\fBprintPrompt (\fRclass\fB PrintPrompt)\fR"
Set the prompt with which
.B ghostview
asks you to for the printer's name.
The default is
.BR "Printer\ Name:\" .
.IP "\fBprintFail (\fRclass\fB printFail)\fR"
Set the string with which
.B ghostview
informs you that the printer command has failed.
The default is:
.DM
	"lpr" command failed.
.DE
.IP "\fBopenPrompt (\fRclass\fB OpenPrompt)\fR"
Set the prompt with which
.B ghostview
asks you for the name of the file to open.
The default is
.BR "Open File:" .
.IP "\fBopenFail (\fRclass\fB OpenFail)\fR"
Set the string with which
.B ghostview
informs you that the open failed.
The default value is:
.DM
	Cannot open file:
.DE
.IP "\fBsavePrompt (\fRclass\fB SavePrompt)\fR"
Set the prompt with which
.B ghostview
asks you for the name of the file to save.
The default value is
.BR "Save File:" .
.IP "\fBsaveFail (\fRclass\fB SaveFail)\fR"
Set the string with which
.B ghostview
informs you that the save failed.
The default value is:
.DM
	Can not save file:
.DE
.IP "\fBopenWindows (\fRclass\fB OpenWindows)\fR"
OpenWindows servers sometimes return error messages about bitmaps not being
one bit deep.
Turning on this resource tells
.B ghostview
not to use any bitmaps, and so avoids the problem.
You lose the functionality of having the current magstep,
orientation, and medium marked on the pop-up menus.
The default value is
.BR false .
.IP "\fBncdwm (\fRclass\fB Ncdwm)\fR"
The Xt Intrinsics has a bug that returns bogus information in
the window manager's size hints.
.B ncdwm
and possibly other window managers are confused by the bogus information
and make the window extremely small.
.B twm
and
.B mwm
ignore the bogus information.
Turning on this resource avoids the problem with
.B ncdwm
by doing things slightly differently.
However, this can confuse other window managers, such as
.BR mwm .
This bug is fixed in X11R5 fix-10.
You should only set this resource if you have the problem.
The default value is
.BR false .
.SH "Ghostview Widget Resources"
You can set the following resources within the widget
.BR Ghostview :
.IP "\fBbusyCursor (\fRclass\fB Cursor)\fR"
The cursor shown when
.B ghostscript
is writing to the window.
The default cursor is
.B target .
.IP "\fBcursor (\fRclass\fB Cursor)\fR"
The cursor shown when
.B ghostscript
is idle.
The default cursor is
.BR crosshair .
.IP "\fBinterpreter (\fRclass\fB Interpreter)\fR"
The executable to call to render PostScript.
It is convenient to set this resource to the path of an alternate
version of
.B ghostscript
for testing.
The default value is
.BR gs .
.IP "\fBpreload (\fRclass\fB Preload)\fR"
Files to load before the PostScript program.
It is convenient to name files that pre-load fonts here for PostScript programs
that continually reload fonts while rendering a page.
The default is to not pre-load any files.
.IP "\fBquiet (\fRclass\fB Quiet)\fR"
Tell
.B ghostscript
not to display informational messages.
The default is
.BR false .
.IP "\fBuseBackingPixmap (\fRclass\fB UseBackingPixmap)\fR"
Tell whether to use a backing pixmap.
If this resource is
.BR false ,
backing store is requested on the
.B Ghostview
window.
Some X servers have limited resources for large pixmaps.
Also, some X servers' backing store is much faster
than using a backing pixmap.
You should reset this resource if your
X server is one of the server types mentioned.
The default value is
.BR true .
.IP "\fBxdpi (\fRclass\fB Resolution)\fR"
Set the X resolution of the window in dots per inch (dpi).
Use this resource to change the resolution of the main window:
the program explicitly sets the X resolution of zoom windows.
.B ghostview
calculates the default value from the screen metrics.
.IP "\fBydpi (\fRclass\fB Resolution)\fR"
Set the Y resolution of the window in dots per inch (dpi).
Use this resource to change the resolution of the main window:
the program explicitly sets the Y resolution of zoom windows.
.B ghostview
calculates the default value from the screen metrics.
.SH "Ghostview Widget Actions"
The following summarizes the actions built into the widget
.BR Ghostview :
.IP "\fBnotify(\fIwidth height xdpi ydpi\^\fB)\fR"
.B ghostview
uses this action for the locator and pop-up zoom windows.
If
.I width
and
.I height
are zero, it uses the action for the locator.
Otherwise, it triggers a pop-up zoom window.
The default
.I width
and
.I height
are 72.
The default
.I xdpi
and
.I ydpi
are 300.
If it is omitted,
.I height
defaults to
.IR width .
Likewise, if it is omitted,
.I ydpi
defaults to
.IR xdpi .
.SH "Command-line Options"
.B ghostview
recognizes the following command-line options.
As discussed above, these simply invoke or set resources built into
.BR ghostview :
.IP \fB\-staticgray\fR 1.0i
Equivalent to setting \fB*Visual: StaticGray\fR.
.IP \fB\-grayscale\fR
Equivalent to setting \fB*Visual: GrayScale\fR.
.IP \fB\-staticcolor\fR
Equivalent to setting \fB*Visual: StaticColor\fR.
.IP \fB\-pseudocolor\fR
Equivalent to setting \fB*Visual: PseudoColor\fR.
.IP \fB\-truecolor\fR
Equivalent to setting \fB*Visual: TrueColor\fR.
.IP \fB\-directcolor\fR
Equivalent to setting \fB*Visual: DirectColor\fR.
.IP \fB\-install\fR
Equivalent to setting \fBGhostview.installStdCmap: True\fR.
.IP \fB\-noinstall\fR
Equivalent to setting \fBGhostview.installStdCmap: False\fR.
.IP \fB\-private\fR
Equivalent to setting \fBGhostview.privateCmap: True\fR.
.IP \fB\-noprivate\fR
Equivalent to setting \fBGhostview.privateCmap: False\fR.
.IP \fB\-center\fR
Equivalent to setting \fBGhostview.autoCenter: True\fR.
.IP \fB\-nocenter\fR
Equivalent to setting \fBGhostview.autoCenter: False\fR.
.IP \fB\-title\fR
Equivalent to setting \fBGhostview.showTitle: True\fR.
.IP \fB\-notitle\fR
Equivalent to setting \fBGhostview.showTitle: False\fR.
.IP \fB\-date\fR
Equivalent to setting \fBGhostview.showDate: True\fR.
.IP \fB\-nodate\fR
Equivalent to setting \fBGhostview.showDate: False\fR.
.IP \fB\-locator\fR
Equivalent to setting \fBGhostview.showLocator: True\fR.
.IP \fB\-nolocator\fR
Equivalent to setting \fBGhostview.showLocator: False\fR.
.IP \fB\-labels\fR
Equivalent to setting \fBGhostview.Labels: True\fR.
.IP \fB\-nolabels\fR
Equivalent to setting \fBGhostview.Labels: False\fR.
.IP \fB\-quiet\fR
Equivalent to setting \fB*Ghostview.quiet: True\fR.
.IP \fB\-noquiet\fR
Equivalent to setting \fB*Ghostview.quiet: False\fR.
.IP "\fB\-preload\fR \fIfile\fR"
Equivalent to setting \fB*Ghostview.preload: \fIfile\fR\fR.
.IP "\fB\-xdpi\fR \fIdpi\fR"
Equivalent to setting \fB*Ghostview.xdpi: \fIdpi\fR\fR.
.IP "\fB\-ydpi\fR \fIdpi\fR"
Equivalent to setting \fB*Ghostview.ydpi: \fIdpi\fR\fR.
.IP "\fB\-resolution\fR \fIdpi\fR"
Equivalent to setting \fB*Ghostview.Resolution: \fIdpi\fR\fR.
.IP "\fB\-dpi\fR \fIdpi\fR"
Equivalent to setting \fB*Ghostview.Resolution: \fIdpi\fR\fR.
.IP "\fB\-magstep\fR \fImagstep\fR"
Equivalent to setting \fBGhostview.magstep: \fImagstep\fR\fR.
.IP \fB\-portrait\fR
Equivalent to setting \fBGhostview.orientation: Portrait\fR.
.IP \fB\-landscape\fR
Equivalent to setting \fBGhostview.orientation: Landscape\fR.
.IP \fB\-upsidedown\fR
Equivalent to setting \fBGhostview.orientation: Upside\-down\fR.
.IP \fB\-seascape\fR
Equivalent to setting \fBGhostview.orientation: Seascape\fR.
.IP \fB\-forceorientation\fR
Equivalent to setting \fBGhostview.forceOrientation: True\fR.
.IP "\fB\-page\fR \fIlabel\fR"
Equivalent to setting \fBGhostview.page: \fIlabel\fR\fR.
.IP \fB\-letter\fR
Equivalent to setting \fBGhostview.pageMedia: Letter\fR.
.IP \fB\-tabloid\fR
Equivalent to setting \fBGhostview.pageMedia: Tabloid\fR.
.IP \fB\-ledger\fR
Equivalent to setting \fBGhostview.pageMedia: Ledger\fR.
.IP \fB\-legal\fR
Equivalent to setting \fBGhostview.pageMedia: Legal\fR.
.IP \fB\-statement\fR
Equivalent to setting \fBGhostview.pageMedia: Statement\fR.
.IP \fB\-executive\fR
Equivalent to setting \fBGhostview.pageMedia: Executive\fR.
.IP \fB\-a3\fR
Equivalent to setting \fBGhostview.pageMedia: A3\fR.
.IP \fB\-a4\fR
Equivalent to setting \fBGhostview.pageMedia: A4\fR.
.IP \fB\-a5\fR
Equivalent to setting \fBGhostview.pageMedia: A5\fR.
.IP \fB\-b4\fR
Equivalent to setting \fBGhostview.pageMedia: B4\fR.
.IP \fB\-b5\fR
Equivalent to setting \fBGhostview.pageMedia: B5\fR.
.IP \fB\-folio\fR
Equivalent to setting \fBGhostview.pageMedia: Folio\fR.
.IP \fB\-quarto\fR
Equivalent to setting \fBGhostview.pageMedia: Quarto\fR.
.IP \fB\-10x14\fR
Equivalent to setting \fBGhostview.pageMedia: 10x14\fR.
.IP \fB\-forcemedia\fR
Equivalent to setting \fBGhostview.forcePageMedia: True\fR.
.IP \fB\-force\fR
Equivalent to setting \fBGhostview.Force: True\fR.
.IP \fB\-swap\fR
Equivalent to setting \fBGhostview.swapLandscape: True\fR.
.IP \fB\-noswap\fR
Equivalent to setting \fBGhostview.swapLandscape: False\fR.
.IP \fB\-openwindows\fR
Equivalent to setting \fBGhostview.openWindows: True\fR.
.IP \fB\-noopenwindows\fR
Equivalent to setting \fBGhostview.openWindows: False\fR.
.IP \fB\-ncdwm\fR
Equivalent to setting \fBGhostview.ncdwm: True\fR.
.IP \fB\-noncdwm\fR
Equivalent to setting \fBGhostview.ncdwm: False\fR.
.SH "Widget Hierarchy"
The following gives the hierarchy of the widgets used within
.BR ghostview :
.nf
.sp \n(pDu
Ghostview  ghostview
	Form  form
		MenuButton  titleButton
			SimpleMenu  menu
				SmeBSB  title
		MenuButton  dateButton
			SimpleMenu  menu
				SmeBSB  date
		Label  locator
		Box  box
			MenuButton  fileButton
				SimpleMenu  menu
					SmeBSB  open
					SmeBSB  reopen
					SmeBSB  printwhole
					SmeBSB  printmarked
					SmeBSB  save
					SmeLine  line
					SmeBSB  copyright
					SmeBSB  quit
			MenuButton  pageButton
				SimpleMenu  menu
					SmeBSB  next
					SmeBSB  show
					SmeBSB  prev
					SmeLine  line
					SmeBSB  center
					SmeLine  line
					SmeBSB  mark
					SmeBSB  unmark
			MenuButton  magstepButton
				SimpleMenu  menu
					SmeBSB  -5
					SmeBSB  -4
					SmeBSB  -3
					SmeBSB  -2
					SmeBSB  -1
					SmeBSB  0
					SmeBSB  1
					SmeBSB  2
					SmeBSB  3
					SmeBSB  4
					SmeBSB  5
			MenuButton  orientationButton
				SimpleMenu  menu
					SmeBSB  portrait
					SmeBSB  landscape
					SmeBSB  upsidedown
					SmeBSB  seascape
					SmeLine  line
					SmeBSB  swap
			MenuButton  pagemediaButton
				SimpleMenu  menu
					SmeBSB  Letter
					SmeBSB  Tabloid
					SmeBSB  Ledger
					SmeBSB  Legal
					SmeBSB  Statement
					SmeBSB  Executive
					SmeBSB  A3
					SmeBSB  A4
					SmeBSB  A5
					SmeBSB  B4
					SmeBSB  B5
					SmeBSB  Folio
					SmeBSB  Quarto
					SmeBSB  10x14
		Text  toc
		Viewport  pageview
			Core  clip
			Ghostview  page
			Scrollbar  horizontal
			Scrollbar  vertical
	TopLevelShell  information
		Form  form
			Text  text
			Command  dismiss
	TopLevelShell  copyright
		Form  form
			Text  text
			Command  dismiss
	TransientShell  pop-up
		Form  dialog
			Label  prompt
			Text  response
			Command  okay
			Command  cancel
	TopLevelShell  zoom
		Form  form
			Ghostview  page
			Command  dismiss
.PP
The following gives the hierarchy of the \fBSelect File\fR dialogue box:
.sp \n(pDu
.nf
TransientShell  selFile
	Form  selFileForm
		Label  selFilePrompt
		Text  selFileField
		Scrollbar  selFileHScroll
		Composite  selFileList1
			Scrollbar  selFileVScroll
			Scrollbar  selFileHScroll
		Composite  selFileList2
			Scrollbar  selFileVScroll
			Scrollbar  selFileHScroll
		Composite  selFileList3
			Scrollbar  selFileVScroll
			Scrollbar  selFileHScroll
		Command  selFileOK
		Command  selFileCancel
.fi
.SH "Environmental Variables"
.B ghostview
reads the following environmental variables:
.IP \fBLPDEST\fR
This names the default printer.
.IP \fBGS_LIB\fR
This names the directory that holds the
.B ghostscript
engine and its initialization files.
You
.I must
set this variable to directory
.B /u1/gnu/lib/ghostscript
and export it before
.B ghostview
can work.
.SH "See Also"
.B
gs,
X applications
.R
.SH Notes
If a document does not begin with the string
.DM
	%!PS\-Adobe\-
.DE
.PP
it does not claim to conform to Adobe's document-structuring convention.
When these documents are encountered,
.B ghostview
is limited to giving you scroll bars and a next-page capability.
Because there is no table of contents,
skipping around the document and marking pages is impossible.
If the document has no table of contents, the pop-up zoom
window always shows the first page.
.PP
If you find a bug, please send a bug report to ghostview@cs.wisc.edu.
.PP
Copyright \(co 1992 by Timothy O. Theisen (tim@cs.wisc.edu), of the
Department of Computer Sciences, University of Wisconsin, Madison.
To contact, telephone 608-262-0438, FAX to 608-262-9777, or write to
the department at 1210 West Dayton Street, Madison, WI 53706, USA.
.PP
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but \fIwithout any warranty\fR; without even the implied warranty of
\fImerchantability\fR or \fIfitness for a particular purpose\fR.
See the GNU General Public License for more details.
A copy of this license is included as part of the source code
for this program.
.PP
The \fBSelect File\fR widget contains the following copyright notice:
.PP
Copyright \(co 1989 Software Research Associates, Inc., Tokyo, Japan.
.PP
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted, provided
that the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation, and that the name of Software Research Associates not be used
in advertising or publicity pertaining to distribution of the software
without specific, written prior permission.
Software Research Associates makes no representations about the suitability
of this software for any purpose.
It is provided ``as is'' without express or implied warranty.
.PP
Software Research Associates disclaims all warranties with regard to this
software, including all implied warranties of merchantability and fitness,
in no event shall Software Research Associates be liable for any special,
indirect or consequential damages or any damages whatsoever resulting from
loss of use, data or profits, whether in an action of contract, negligence
or other tortious action, arising out of or in connection with the use or
performance of this software.
.PP
Author:	Erik M. van der Poel, Software Research Associates, Inc.,
Tokyo, Japan, (erik@sra.co.jp).
