LPDEST
The LPDEST environment variable gives the default printer destination on System V.
View postscript documents using ghostscript
ghostview [filename]
or
ghostview [-monochrome]
[-grayscale]
[-color]
[-
[no]
title]
[-
[no]
wtitle]
[-
[no]
date]
[-
[no]
locator]
[-
[no]
labels]
[-resolution
dpi]
[-dpi
dpi]
[-xdpi
dpi]
[-ydpi
dpi]
[-magstep
n]
[-
[no]
safer]
[-
[no]
quiet]
[-arguments
arguments]
[-
[no]
center]
[-portrait]
[-landscape]
[-upsidedown]
[-seascape]
[-
[no]
swap]
[-letter]
[-tabloid]
[-ledger]
[-legal]
[-statement]
[-executive]
[-a3]
[-a4]
[-a5]
[-b4]
[-b5]
[-folio]
[-quarto]
[-10x14]
[-force]
[-forceorientation]
[-forcemedia]
[-
[no]
openwindows]
[-
[no]
ncdwm]
[-page
label]
[-toolkitoption ...]
[filename]
The ghostview program provides an X11 user interface for the ghostscript interpreter. Ghostview and ghostscript function as two cooperating programs. Ghostview creates the viewing window and ghostscript draws in it.
Don't be alarmed by the number of options. Generally, one invokes ghostview with just one parameter, the name of the file to be previewed. If the filename is ``-'', ghostview will read from ``stdin''. The options provide a way to set X resources from the command line for a single invocation of ghostview. For that reason, discussion of the options is delayed until after the X resources are discussed.
The main viewport is on the right side of the main window. If the page is larger than the viewport, there will be scroll bars along the bottom and right edges of the viewport. 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 will display 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 popup menu. Over the menu box and table of contents there are three optional labels that contain the title, date, and locator. The title label contains the document title found in the DSC comments. If no title can be found, the filename 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. Since the title and date labels may be clipped by the main viewport, the date and title labels are push buttons that bring up a popup window with the title or date. These popup windows also show the ``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.
Within the main viewport the mouse cursor is a ``target'' when ghostscript is doing work. The cursor is a ``cross hair'' when ghostscript is idle. When moving to another page in a document, it is generally best to wait for ghostscript to become idle. Otherwise, the current ghostscript process must be killed and the overhead of reading the prologue is incurred again.
Ghostview will check to see if the file has been modified just before it displays a page or when the application is deiconified. If the file has changed, it will reopen the file.
Clicking anywhere within the viewport will popup 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 ghostscript. The locator reports the position of the cursor in the zoom windows as well as the main viewport.
In the table of contents, the first and third mouse button function 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 will cause that page to be shown. The page being displayed is marked with a '<' in the right margin of the table of contents.
There are several additional windows that may appear. The copyright window will appear whenever copyright information is requested. The information window appears whenever the ghostscript process writes to ``stdout'' or ``stderr''. Whenever there is an error in the PostScript program, the stack trace will appear in this window. When ghostscript is invoked without the quiet option, informational message regarding the state of ghostscript will appear in the information window. The copyright and information windows can be dismissed by pushing the ``Dismiss'' button.
The Select File dialog widget will appear when you wish to open or save a file. The Select File dialog widget allows an X11 user to select a file by typing the path or by browsing in directory listings and selecting entries with the mouse.
The space bar can be pressed to complete filenames, and tilde is used for home directories. All the usual key bindings can be used in the text widget, except for Return and Control-M, which are equivalent to pressing the 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, similar to the -F option of ls(1).
The Select File dialog widget is in total control until is pops down. No other controls in ghostview will be active during this time.
Most of the popup menu commands have an equivalent action that can be invoked from the keyboard. The popup menu entry must be sensitive (i.e. not grayed out) for the action to have effect. Here is the default keyboard binding:
Bound to GhostviewQuit() which is equivalent to pushing the Quit menu button on the Ghostview menu.
Bound to GhostviewOpen() which is equivalent to pushing the Open... menu button on the File menu.
Bound to GhostviewReopen() which is equivalent to pushing the Reopen menu button on the File menu.
Bound to GhostviewSave() which is equivalent to pushing the Save marked pages... menu button on the File menu.
Bound to GhostviewPrintMarked() which is equivalent to pushing the Print marked pages... menu button on the File menu.
Shift-PBound to GhostviewPrintWhole() which is equivalent to pushing the Print... menu button on the File menu.
BackSpace, Delete, Prior, BBound to GhostviewPrevious() which is equivalent to pushing the Previous menu button on the Page menu.
space, Return, Next, FBound to GhostviewNext() which is equivalent to pushing the Next menu button on the Page menu.
period, Ctrl-LBound to GhostviewShow() which is equivalent to pushing the Redisplay menu button on the Page menu.
Bound to GhostviewMark() which is equivalent to pushing the Mark menu button on the Page menu.
Bound to GhostviewUnMark() which is equivalent to pushing the Unmark menu button on the Page menu.
0Bound to GhostviewMagstep(0) which is equivalent to pushing the 0 menu button on the Magstep menu.
1Bound to GhostviewMagstep(1) which is equivalent to pushing the 1 menu button on the Magstep menu.
2Bound to GhostviewMagstep(2) which is equivalent to pushing the 2 menu button on the Magstep menu.
3Bound to GhostviewMagstep(3) which is equivalent to pushing the 3 menu button on the Magstep menu.
4Bound to GhostviewMagstep(4) which is equivalent to pushing the 4 menu button on the Magstep menu.
5Bound to GhostviewMagstep(5) which is equivalent to pushing the 5 menu button on the Magstep menu.
Bound to GhostviewIncreaseMagstep() which increases the magstep by 1.
-Bound to GhostviewDecreaseMagstep() which decreases the magstep by 1.
Bound to GhostviewUp() which scrolls the main viewport up.
Bound to GhostviewDown() which scrolls the main viewport down.
Bound to GhostviewLeft() which scrolls the main viewport left.
Bound to GhostviewDown() which scrolls the main viewport down.
Bound to GhostviewUp() which scrolls the main viewport up.
Bound to GhostviewRight() which scrolls the main viewport right.
Up (arrow)Bound to GhostviewDefault() GhostviewSetOrientation(portrait) which is equivalent to pushing Portrait with the first mouse button on the Orientation menu.
Right (arrow)Bound to GhostviewDefault() GhostviewSetOrientation(landscape) which is equivalent to pushing Landscape with the first mouse button on the Orientation menu.
Down (arrow)Bound to GhostviewDefault() GhostviewSetOrientation(upside-down) which is equivalent to pushing Upside-down with the first mouse button on the Orientation menu.
Left (arrow)Bound to GhostviewDefault() GhostviewSetOrientation(seascape) which is equivalent to pushing Seascape with the first mouse button on the Orientation menu.
Shift-Up (arrow)Bound to GhostviewForce() GhostviewSetOrientation(portrait) which is equivalent to pushing Portrait with the second mouse button on the Orientation menu.
Shift-Right (arrow)Bound to GhostviewForce() GhostviewSetOrientation(landscape) which is equivalent to pushing Landscape with the second mouse button on the Orientation menu.
Shift-Down (arrow)Bound to GhostviewForce() GhostviewSetOrientation(upside-down) which is equivalent to pushing Upside-down with the second mouse button on the Orientation menu.
Shift-Left (arrow)Bound to GhostviewForce() GhostviewSetOrientation(seascape) which is equivalent to pushing Seascape with the second mouse button on the Orientation menu.
Most of the popup menu commands have an equivalent action that can be used in a translation. The popup menu entry must be sensitive (i.e. not grayed out) for the action to have effect. Here is the list of actions:
GhostviewCopyright()Equivalent to pushing the Copyright... menu button on the Ghostview menu.
GhostviewQuit()Equivalent to pushing the Quit menu button on the Ghostview menu.
GhostviewOpen()Equivalent to pushing the Open... menu button on the File menu.
GhostviewReopen()Equivalent to pushing the Reopen menu button on the File menu.
GhostviewSave()Equivalent to pushing the Save marked pages... menu button on the File menu.
GhostviewPrintWhole()Equivalent to pushing the Print... menu button on the File menu.
GhostviewPrintMarked()Equivalent to pushing the Print marked pages... menu button on the File menu.
GhostviewPrevious()Equivalent to pushing the Previous menu button on the Page menu.
GhostviewShow()Equivalent to pushing the Redisplay menu button on the Page menu.
GhostviewNext()Equivalent to pushing the Next menu button on the Page menu.
GhostviewCenter()Equivalent to pushing the Center menu button on the Page menu.
GhostviewMark()Equivalent to pushing the Mark menu button on the Page menu.
GhostviewUnmark()Equivalent to pushing the Unmark menu button on the Page menu.
GhostviewSetMagstep(magstep)Sets the magstep. The parameter must be an integer.
GhostviewIncreaseMagstep()Increases magstep by one.
GhostviewDecreaseMagstep()Decreases magstep by one.
GhostviewSetOrientation(orientation)Set the orientation to the passed parameter. The parameter must be portrait, landscape, upside-down, or seascape.
GhostviewSwapLandscape()Equivalent to pushing the Swap Landscape menu button on the Orientation menu.
GhostviewSetPageMedia(media-name)Sets the media. The parameter should be either a media defined in the document or a standard media.
GhostviewDefault()The orientation or media being set is not forced on the document. This action is called before the action that sets the orientation or media.
GhostviewForce()The orientation or media being set is forced on the document. This action is called before the action that sets the orientation or media.
GhostviewDeleteWindow()Destroy the current window. This provides a way to implement the Delete Window protocol for window managers.
GhostviewDismiss()Pop down the current window. This provides a way to implement the Delete Window protocol for window managers.
GhostviewScrollUp()Scroll the main viewport up.
GhostviewScrollDown()Scroll the main viewport down.
GhostviewScrollLeft()Scroll the main viewport left.
GhostviewScrollRight()Scroll the main viewport right.
GhostviewEraseLocator()Used to erase the locator when leaving a Ghostview widget.
GhostviewCheckFile()Checks to see if the file changed and refreshes the screen if necessary.
The following application resources may be set to control the default behavior of ghostview.
Tells whether to display the %%Title comment. The default is ``true''.
Tells whether to copy the %%Title comment into the window title. The default is ``true''.
Tells whether to display the %%Data comment. The default is ``true''.
Tells whether to display the locator. The default is ``true''.
Tells whether to center the page within the viewport whenever the page size changes. The default is ``true''.
Tells how many pixels ghostview should reserve for window decorations in the horizontal direction. The default value is ``20''.
Tells how many pixels ghostview should reserve for window decorations in the vertical direction. The default value is ``44''.
Tells the smallest magstep to display. The default is ``-5''.
Tells the largest magstep to display. The default is ``5''.
Sets the default magstep. The default is ``0''.
Sets the default orientation. The default is ``Portrait''.
Gives the initial page to display. This resource only affects the display of the file listed on the command line. The default is NULL.
Sets the default page media. The default is ``Letter''.
Tells whether to force the orientation on the document. The default is ``false''.
Tells whether to force the page media on the document. The default is ``false''.
Tells whether to swap the meaning of Landscape and Seascape. The default is ``false''.
Sets the command used for printing. The printer environment variable is set to the desired printer and then this command is executed using popen. This command should read from ``stdin'' and send the file to the appropriate printer. The default value is ``lpr'' for BSD and ``lp'' for System V.
Gives the name of the printer environment variable. The default value is ``PRINTER'' for BSD and ``LPDEST'' for System V.
Gives the printer name to use when the printer environment variable is not set. The default value is NULL.
Sets the prompt used to ask for the printer name. The default value is ``Printer Name: ''.
Sets the string used to inform the user that the printer command failed. The default is ``"lpr" command failed.''.
Sets the prompt used to ask for a file name to open. The default value is ``Open File: ''.
Sets the string used to inform the user that the open failed. The default value is ``Cannot open file: ''.
Sets the prompt used to ask for a file name to save. The default value is ``Save File: ''.
Sets the string used to inform the user that the save failed. The default value is ``Cannot save file: ''.
OpenWindows servers sometimes cause error messages about bitmaps not being 1 bit deep. Turning on this resource avoids the problem by not using any bitmaps. You lose the functionality of having the current magstep, orientation and media marked on the popup menus. The default value is ``false''.
The Xt Intrinsics has a bug that causes bogus information in the window manager size hints. Ncdwm and possibly other window managers get confused by the bogus information and make the window extremely small. Twm and mwm ignore the bogus information. Turning on the resource avoids the problem with ncdwm by doing things slightly differently. However, this can confuse other window managers such as mwm. This bug is fixed in X11R5 fix-10. You should only set this resource if you have the problem. The default value is ``false''.
Certain resources in the Ghostview widget may be set by the user. These selected resources are presented below.
Additional arguments passed to the interpreter. It is convenient to name files that preload fonts here for PostScript programs that continually reload fonts while rendering a page. The default is no additional arguments.
The cursor shown when ghostscript is rendering to the window. The busy cursor is set to the ``target'' by the application defaults.
The cursor shown when ghostscript is idle. The default cursor is the ``crosshair''.
The name of the executable to call to render the PostScript. It is convenient to set this resource to the path of an alternate version of ghostscript for testing. The default value is ``gs''.
Tells ghostscript how to restrict the palette used when rendering. The possible values are ``color'', ``grayscale'', and ``monochrome''. The default value is ``color''.
Tells ghostscript whether to supress informational messages. The default value is ``true''.
Tells ghostscript whether to run in ``safer'' mode. The default value is ``true''.
Tells whether to use a backing pixmap. If this resource is false, backing store is requested on the 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 ``true''.
Sets the X resolution of the window in dots per inch. You can use this resource to affect the main window. Zoom windows have their X dpi set explicitly in the program. The default value is calculated from the screen metrics.
Sets the Y resolution of the window in dots per inch. You can use this resource to affect the main window. Zoom windows have their Y dpi set explicitly in the program. The default value is calculated from the screen metrics.
The notify event is used by the ghostview application for the locator and popup zoom windows. If the width and height are 0, the event is user for the locator. Otherwise, it triggers a popup zoom window. The default width and height are 72. The default xdpi and ydpi are 300. The height will default to the width if the height is omitted. The xdpi will default to the xdpi if the ydpi is omitted.
-monochrome
Equivalent to setting ``*Ghostview.palette: Monochrome''.
-grayscale
Equivalent to setting ``*Ghostview.palette: GrayScale''.
-color
Equivalent to setting ``*Ghostview.palette: Color''.
-title
Equivalent to setting ``Ghostview.showTitle: True''.
-notitle
Equivalent to setting ``Ghostview.showTitle: False''.
-wtitle
Equivalent to setting ``Ghostview.windowTitle: True''.
-nowtitle
Equivalent to setting ``Ghostview.windowTitle: False''.
-date
Equivalent to setting ``Ghostview.showDate: True''.
-nodate
Equivalent to setting ``Ghostview.showDate: False''.
-locator
Equivalent to setting ``Ghostview.showLocator: True''.
-nolocator
Equivalent to setting ``Ghostview.showLocator: False''.
-labels
Equivalent to setting ``Ghostview.Labels: True''.
-nolabels
Equivalent to setting ``Ghostview.Labels: False''.
-resolution dpi
Equivalent to setting ``*Ghostview.Resolution: dpi''.
-dpi dpi
Equivalent to setting ``*Ghostview.Resolution: dpi''.
-xdpi dpi
Equivalent to setting ``*Ghostview.xdpi: dpi''.
-ydpi dpi
Equivalent to setting ``*Ghostview.ydpi: dpi''.
-magstep magstep
Equivalent to setting ``Ghostview.magstep: magstep''.
-safer
Equivalent to setting ``*Ghostview.safer: True''.
-nosafer
Equivalent to setting ``*Ghostview.safer: False''.
-quiet
Equivalent to setting ``*Ghostview.quiet: True''.
-noquiet
Equivalent to setting ``*Ghostview.quiet: False''.
-arguments arguments
Equivalent to setting ``*Ghostview.arguments: arguments''.
-center
Equivalent to setting ``Ghostview.autoCenter: True''.
-nocenter
Equivalent to setting ``Ghostview.autoCenter: False''.
-portrait
Equivalent to setting ``Ghostview.orientation: Portrait''.
-landscape
Equivalent to setting ``Ghostview.orientation: Landscape''.
-upsidedown
Equivalent to setting ``Ghostview.orientation: Upside-down''.
-seascape
Equivalent to setting ``Ghostview.orientation: Seascape''.
-swap
Equivalent to setting ``Ghostview.swapLandscape: True''.
-noswap
Equivalent to setting ``Ghostview.swapLandscape: False''.
-letter
Equivalent to setting ``Ghostview.pageMedia: Letter''.
-tabloid
Equivalent to setting ``Ghostview.pageMedia: Tabloid''.
-ledger
Equivalent to setting ``Ghostview.pageMedia: Ledger''.
-legal
Equivalent to setting ``Ghostview.pageMedia: Legal''.
-statement
Equivalent to setting ``Ghostview.pageMedia: Statement''.
-executive
Equivalent to setting ``Ghostview.pageMedia: Executive''.
-a3
Equivalent to setting ``Ghostview.pageMedia: A3''.
-a4
Equivalent to setting ``Ghostview.pageMedia: A4''.
-a5
Equivalent to setting ``Ghostview.pageMedia: A5''.
-b4
Equivalent to setting ``Ghostview.pageMedia: B4''.
-b5
Equivalent to setting ``Ghostview.pageMedia: B5''.
-folio
Equivalent to setting ``Ghostview.pageMedia: Folio''.
-quarto
Equivalent to setting ``Ghostview.pageMedia: Quarto''.
-10x14
Equivalent to setting ``Ghostview.pageMedia: 10x14''.
-force
Equivalent to setting ``Ghostview.Force: True''.
-forceorientation
Equivalent to setting ``Ghostview.forceOrientation: True''.
-forcemedia
Equivalent to setting ``Ghostview.forcePageMedia: True''.
-openwindows
Equivalent to setting ``Ghostview.openWindows: True''.
-noopenwindows
Equivalent to setting ``Ghostview.openWindows: False''.
-ncdwm
Equivalent to setting ``Ghostview.ncdwm: True''.
-noncdwm
Equivalent to setting ``Ghostview.ncdwm: False''.
-page label
Equivalent to setting ``Ghostview.page: label''.
The hierarchy of the ghostview application: 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 popup Form dialog Label prompt Text response Command okay Command cancel TopLevelShell zoom Form form Ghostview page Command dismiss The hierarchy of the Select File dialog box: 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
LPDEST
The LPDEST environment variable gives the default printer destination on System V.
PRINTER
The PRINTER environment variable gives the default printer destination on BSD.
If the document does not begin with ``%!PS-Adobe-'', it does not claim conformance to the document structuring convention. When these documents are encountered, the functionality of 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 there is no table of contents for the document, the popup zoom window will always show the first page.
The Select File widget contains the following copyright notice:
Copyright 1989 Software Research Associates, Inc., Tokyo, Japan
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.
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.
Author: Erik M. van der Poel Software Research Associates, Inc., Tokyo, Japan [email protected]
7 releases since Debian 1.1 (Buzz); the text changed 1 time.
-nowtitle since Debian 1.2 (Rex);
-wtitle since Debian 1.2 (Rex).